home *** CD-ROM | disk | FTP | other *** search
MacBinary | 1993-03-04 | 15.3 KB | [TEXT/KAHL] |
open in:
MacOS 8.1
|
Win98
|
DOS
browse contents |
view JSON data
|
view as text
This file was processed as: MacBinary
(archive/macBinary).
Confidence | Program | Detection | Match Type | Support
|
---|
66%
| dexvert
| Compact Compressed (Unix) (archive/compact)
| ext
| Supported |
10%
| dexvert
| MacBinary (archive/macBinary)
| fallback
| Supported |
1%
| dexvert
| Text File (text/txt)
| fallback
| Supported |
100%
| file
| MacBinary II, inited, Thu Mar 4 11:39:51 1993, modified Thu Mar 4 11:39:51 1993, creator Think C, type ASCII, 14877 bytes "TestGDVideo.c" , at 0x3a9d 502 bytes resource
| default (weak)
| |
99%
| file
| data
| default
| |
74%
| TrID
| Macintosh plain text (MacBinary)
| default
| |
25%
| TrID
| MacBinary 2
| default (weak)
| |
100%
| siegfried
| fmt/1762 MacBinary (II)
| default
| |
100%
| lsar
| MacBinary
| default
|
|
id metadata |
---|
key | value |
---|
macFileType | [TEXT] |
macFileCreator | [KAHL] |
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 0d 54 65 73 74 47 44 | 56 69 64 65 6f 2e 63 00 |..TestGD|Video.c.|
|00000010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 54 45 58 54 4b 41 48 | 4c 01 00 00 00 00 00 00 |.TEXTKAH|L.......|
|00000050| 00 00 00 00 00 3a 1d 00 | 00 01 f6 a7 bb e1 57 a7 |.....:..|......W.|
|00000060| bb e1 57 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |..W.....|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 ff ea 00 00 |........|........|
|00000080| 2f 2a 20 0d 54 65 73 74 | 47 44 56 69 64 65 6f 2e |/* .Test|GDVideo.|
|00000090| 63 20 62 79 20 44 65 6e | 69 73 20 47 2e 20 50 65 |c by Den|is G. Pe|
|000000a0| 6c 6c 69 0d 54 65 73 74 | 73 20 61 6c 6c 20 74 68 |lli.Test|s all th|
|000000b0| 65 20 64 6f 63 75 6d 65 | 6e 74 65 64 20 43 6f 6e |e docume|nted Con|
|000000c0| 74 72 6f 6c 20 61 6e 64 | 20 53 74 61 74 75 73 20 |trol and| Status |
|000000d0| 63 61 6c 6c 73 20 69 6d | 70 6c 65 6d 65 6e 74 65 |calls im|plemente|
|000000e0| 64 20 69 6e 20 47 44 56 | 69 64 65 6f 2e 63 0d 54 |d in GDV|ideo.c.T|
|000000f0| 68 65 20 63 61 6c 6c 73 | 20 61 72 65 20 64 6f 63 |he calls| are doc|
|00000100| 75 6d 65 6e 74 65 64 20 | 69 6e 20 44 65 73 69 67 |umented |in Desig|
|00000110| 6e 69 6e 67 20 43 61 72 | 64 73 20 61 6e 64 20 44 |ning Car|ds and D|
|00000120| 72 69 76 65 72 73 2c 20 | 33 72 64 20 45 64 69 74 |rivers, |3rd Edit|
|00000130| 69 6f 6e 2e 0d 0d 54 68 | 65 20 6d 61 69 6e 20 70 |ion...Th|e main p|
|00000140| 75 72 70 6f 73 65 20 6f | 66 20 74 68 69 73 20 70 |urpose o|f this p|
|00000150| 72 6f 67 72 61 6d 20 69 | 73 20 74 6f 20 66 69 6e |rogram i|s to fin|
|00000160| 64 20 62 75 67 73 20 69 | 6e 20 76 69 64 65 6f 20 |d bugs i|n video |
|00000170| 64 72 69 76 65 72 73 2e | 20 49 66 20 79 6f 75 20 |drivers.| If you |
|00000180| 64 6f 0d 66 69 6e 64 20 | 61 20 62 75 67 20 74 68 |do.find |a bug th|
|00000190| 61 74 20 69 73 6e 27 74 | 20 61 6c 72 65 61 64 79 |at isn't| already|
|000001a0| 20 6c 69 73 74 65 64 20 | 69 6e 20 74 68 65 20 74 | listed |in the t|
|000001b0| 61 62 6c 65 20 61 74 20 | 74 68 65 20 65 6e 64 20 |able at |the end |
|000001c0| 6f 66 20 d2 56 69 64 65 | 6f 20 73 79 6e 63 68 d3 |of .Vide|o synch.|
|000001d0| 0d 74 68 65 6e 20 70 6c | 65 61 73 65 20 73 65 6e |.then pl|ease sen|
|000001e0| 64 20 69 74 20 74 6f 20 | 64 65 6e 69 73 5f 70 65 |d it to |denis_pe|
|000001f0| 6c 6c 69 40 69 73 72 2e | 73 79 72 2e 65 64 75 20 |lli@isr.|syr.edu |
|00000200| 0d 0d 55 6e 66 6f 72 74 | 75 6e 61 74 65 6c 79 2c |..Unfort|unately,|
|00000210| 20 74 68 65 20 6d 6f 73 | 74 20 63 6f 6d 6d 6f 6e | the mos|t common|
|00000220| 20 77 61 79 20 74 6f 20 | 64 69 73 63 6f 76 65 72 | way to |discover|
|00000230| 20 61 20 6e 65 77 20 62 | 75 67 20 69 73 20 66 6f | a new b|ug is fo|
|00000240| 72 20 74 68 69 73 20 70 | 72 6f 67 72 61 6d 20 74 |r this p|rogram t|
|00000250| 6f 0d 63 72 61 73 68 2e | 20 50 6c 65 61 73 65 20 |o.crash.| Please |
|00000260| 72 65 70 6f 72 74 20 63 | 72 61 73 68 65 73 20 74 |report c|rashes t|
|00000270| 6f 20 64 65 6e 69 73 5f | 70 65 6c 6c 69 40 69 73 |o denis_|pelli@is|
|00000280| 72 2e 73 79 72 2e 65 64 | 75 0d 0d 42 55 47 53 3a |r.syr.ed|u..BUGS:|
|00000290| 0d 0d 48 49 53 54 4f 52 | 59 3a 0d 38 2f 31 31 2f |..HISTOR|Y:.8/11/|
|000002a0| 38 39 09 64 67 70 09 77 | 72 6f 74 65 20 69 74 0d |89.dgp.w|rote it.|
|000002b0| 33 2f 32 33 2f 39 30 09 | 64 67 70 09 69 6e 74 72 |3/23/90.|dgp.intr|
|000002c0| 6f 64 75 63 65 64 20 73 | 70 65 63 69 61 6c 20 63 |oduced s|pecial c|
|000002d0| 61 73 65 20 63 6f 6e 64 | 69 74 69 6f 6e 61 6c 73 |ase cond|itionals|
|000002e0| 20 74 6f 20 73 6b 69 70 | 20 74 65 73 74 73 20 6b | to skip| tests k|
|000002f0| 6e 6f 77 6e 20 74 6f 20 | 63 72 61 73 68 0d 09 09 |nown to |crash...|
|00000300| 09 70 61 72 74 69 63 75 | 6c 61 72 20 64 72 69 76 |.particu|lar driv|
|00000310| 65 72 73 2e 0d 33 2f 32 | 33 2f 39 30 09 64 67 70 |ers..3/2|3/90.dgp|
|00000320| 09 6d 61 64 65 20 69 74 | 20 63 6f 6d 70 61 74 69 |.made it| compati|
|00000330| 62 6c 65 20 77 69 74 68 | 20 4d 50 57 20 43 2c 20 |ble with| MPW C, |
|00000340| 61 73 20 61 20 74 6f 6f | 6c 2e 0d 33 2f 32 34 2f |as a too|l..3/24/|
|00000350| 39 30 09 64 67 70 09 6d | 61 64 65 20 73 6f 6d 65 |90.dgp.m|ade some|
|00000360| 20 6f 66 20 74 68 65 20 | 70 72 69 6e 74 6f 75 74 | of the |printout|
|00000370| 73 20 6c 65 73 73 20 63 | 72 79 70 74 69 63 2e 0d |s less c|ryptic..|
|00000380| 33 2f 33 31 2f 39 30 09 | 64 67 70 09 69 6e 74 72 |3/31/90.|dgp.intr|
|00000390| 6f 64 75 63 65 64 20 52 | 65 73 74 6f 72 65 44 65 |oduced R|estoreDe|
|000003a0| 76 69 63 65 43 6c 75 74 | 20 61 66 74 65 72 20 53 |viceClut| after S|
|000003b0| 65 74 4d 6f 64 65 20 63 | 61 6c 6c 2e 0d 37 2f 31 |etMode c|all..7/1|
|000003c0| 32 2f 39 30 09 64 67 70 | 09 74 69 64 69 65 64 20 |2/90.dgp|.tidied |
|000003d0| 75 70 20 74 68 65 20 69 | 6e 69 74 69 61 6c 20 70 |up the i|nitial p|
|000003e0| 72 69 6e 74 66 0d 37 2f | 31 39 2f 39 30 09 64 67 |rintf.7/|19/90.dg|
|000003f0| 70 09 52 65 6e 61 6d 65 | 64 20 56 69 64 65 6f 54 |p.Rename|d VideoT|
|00000400| 65 73 74 2e 63 20 0d 09 | 09 09 4f 70 65 6e 20 26 |est.c ..|..Open &|
|00000410| 20 63 6c 6f 73 65 20 61 | 20 77 69 6e 64 6f 77 20 | close a| window |
|00000420| 6f 6e 20 65 61 63 68 20 | 73 63 72 65 65 6e 20 61 |on each |screen a|
|00000430| 6e 64 20 44 72 61 77 4d | 65 6e 75 42 61 72 28 29 |nd DrawM|enuBar()|
|00000440| 0d 09 09 09 73 6f 20 74 | 68 61 74 20 51 75 69 63 |....so t|hat Quic|
|00000450| 6b 44 72 61 77 20 77 69 | 6c 6c 20 72 65 73 74 6f |kDraw wi|ll resto|
|00000460| 72 65 20 65 61 63 68 20 | 73 63 72 65 65 6e 2e 0d |re each |screen..|
|00000470| 37 2f 32 38 2f 39 30 09 | 64 67 70 09 69 74 61 6c |7/28/90.|dgp.ital|
|00000480| 69 63 69 7a 65 64 20 6e | 61 6d 65 20 6f 66 20 62 |icized n|ame of b|
|00000490| 6f 6f 6b 2e 0d 39 2f 39 | 2f 39 30 09 64 67 70 09 |ook..9/9|/90.dgp.|
|000004a0| 41 64 64 65 64 20 71 75 | 69 74 20 62 79 20 43 6f |Added qu|it by Co|
|000004b0| 6d 6d 61 6e 64 2d 2e 20 | 66 6f 72 20 67 72 61 63 |mmand-. |for grac|
|000004c0| 65 66 75 6c 20 65 78 69 | 74 20 66 72 6f 6d 20 62 |eful exi|t from b|
|000004d0| 61 64 20 73 69 74 75 61 | 74 69 6f 6e 73 2e 0d 31 |ad situa|tions..1|
|000004e0| 30 2f 31 37 2f 39 30 20 | 64 67 70 20 52 65 6d 6f |0/17/90 |dgp Remo|
|000004f0| 76 65 64 20 75 6e 75 73 | 65 64 20 76 61 72 69 61 |ved unus|ed varia|
|00000500| 62 6c 65 73 2e 20 52 65 | 70 6c 61 63 65 64 20 54 |bles. Re|placed T|
|00000510| 52 55 45 20 26 20 46 41 | 4c 53 45 20 62 79 20 31 |RUE & FA|LSE by 1|
|00000520| 20 26 20 30 2e 0d 31 30 | 2f 32 30 2f 39 30 09 64 | & 0..10|/20/90.d|
|00000530| 67 70 09 41 70 70 6c 65 | 20 68 61 73 20 72 65 6e |gp.Apple| has ren|
|00000540| 61 6d 65 64 20 74 68 65 | 20 63 6f 6e 74 72 6f 6c |amed the| control|
|00000550| 20 61 6e 64 20 73 74 61 | 74 75 73 20 63 61 6c 6c | and sta|tus call|
|00000560| 73 2c 20 73 6f 20 49 20 | 66 6f 6c 6c 6f 77 65 64 |s, so I |followed|
|00000570| 20 73 75 69 74 3a 0d 09 | 09 09 09 47 44 47 65 74 | suit:..|...GDGet|
|00000580| 50 61 67 65 42 61 73 65 | 20 72 65 70 6c 61 63 65 |PageBase| replace|
|00000590| 73 20 47 44 47 65 74 42 | 61 73 65 41 64 64 72 0d |s GDGetB|aseAddr.|
|000005a0| 09 09 09 09 47 44 52 65 | 73 65 74 20 72 65 70 6c |....GDRe|set repl|
|000005b0| 61 63 65 73 20 47 44 49 | 6e 69 74 0d 09 09 09 09 |aces GDI|nit.....|
|000005c0| 47 44 47 72 61 79 50 61 | 67 65 20 72 65 70 6c 61 |GDGrayPa|ge repla|
|000005d0| 63 65 20 47 44 47 72 61 | 79 53 63 72 65 65 6e 0d |ce GDGra|yScreen.|
|000005e0| 09 09 09 09 47 44 47 65 | 74 50 61 67 65 43 6e 74 |....GDGe|tPageCnt|
|000005f0| 20 72 65 70 6c 61 63 65 | 73 20 47 44 47 65 74 50 | replace|s GDGetP|
|00000600| 61 67 65 73 0d 31 30 2f | 32 32 2f 39 30 20 64 67 |ages.10/|22/90 dg|
|00000610| 70 20 50 72 69 6e 74 20 | 6f 75 74 20 6e 75 6d 62 |p Print |out numb|
|00000620| 65 72 20 6f 66 20 70 61 | 67 65 73 20 66 6f 72 20 |er of pa|ges for |
|00000630| 61 6c 6c 20 6d 6f 64 65 | 73 2c 20 6e 6f 74 20 6a |all mode|s, not j|
|00000640| 75 73 74 20 63 75 72 72 | 65 6e 74 20 6d 6f 64 65 |ust curr|ent mode|
|00000650| 2e 0d 09 09 20 64 67 70 | 20 52 65 73 74 6f 72 65 |.... dgp| Restore|
|00000660| 20 63 6c 75 74 20 6d 61 | 6e 75 61 6c 6c 79 20 73 | clut ma|nually s|
|00000670| 69 6e 63 65 20 52 65 73 | 74 6f 72 65 44 65 76 69 |ince Res|toreDevi|
|00000680| 63 65 43 6c 75 74 28 29 | 20 64 6f 65 73 6e 27 74 |ceClut()| doesn't|
|00000690| 0d 09 09 20 09 77 6f 72 | 6b 20 6f 6e 20 4e 75 56 |... .wor|k on NuV|
|000006a0| 69 73 74 61 2e 0d 31 30 | 2f 32 38 2f 39 30 20 64 |ista..10|/28/90 d|
|000006b0| 67 70 20 4f 6e 6c 79 20 | 74 65 73 74 20 47 65 74 |gp Only |test Get|
|000006c0| 49 6e 74 65 72 72 75 70 | 74 20 26 20 53 65 74 49 |Interrup|t & SetI|
|000006d0| 6e 74 65 72 72 75 70 74 | 20 69 66 20 53 79 73 74 |nterrupt| if Syst|
|000006e0| 65 6d 20 69 73 20 36 2e | 30 35 20 6f 72 20 68 69 |em is 6.|05 or hi|
|000006f0| 67 68 65 72 2e 20 54 68 | 69 73 0d 09 09 09 61 76 |gher. Th|is....av|
|00000700| 6f 69 64 73 20 53 65 74 | 49 6e 74 65 72 72 75 70 |oids Set|Interrup|
|00000710| 74 28 29 20 63 72 61 73 | 68 20 6f 6e 20 6f 6c 64 |t() cras|h on old|
|00000720| 20 41 70 70 6c 65 20 54 | 46 42 20 76 69 64 65 6f | Apple T|FB video|
|00000730| 20 64 72 69 76 65 72 2e | 0d 32 2f 31 32 2f 39 31 | driver.|.2/12/91|
|00000740| 09 64 67 70 09 50 72 65 | 63 65 64 65 64 20 47 44 |.dgp.Pre|ceded GD|
|00000750| 47 72 61 79 50 61 67 65 | 28 29 20 63 61 6c 6c 20 |GrayPage|() call |
|00000760| 62 79 20 47 44 53 65 74 | 4d 6f 64 65 28 29 20 74 |by GDSet|Mode() t|
|00000770| 6f 20 63 75 72 65 20 63 | 72 61 73 68 20 77 68 65 |o cure c|rash whe|
|00000780| 6e 20 72 75 6e 6e 69 6e | 67 0d 09 09 09 70 72 6f |n runnin|g....pro|
|00000790| 67 72 61 6d 20 69 6d 6d | 65 64 69 61 74 65 6c 79 |gram imm|ediately|
|000007a0| 20 61 66 74 65 72 20 72 | 65 62 6f 6f 74 69 6e 67 | after r|ebooting|
|000007b0| 2e 20 4d 79 73 74 65 72 | 69 6f 75 73 2e 0d 09 09 |. Myster|ious....|
|000007c0| 09 41 64 64 65 64 20 53 | 65 6c 65 63 74 57 69 6e |.Added S|electWin|
|000007d0| 64 6f 77 28 29 20 61 74 | 20 65 6e 64 20 6f 66 20 |dow() at| end of |
|000007e0| 70 72 6f 67 72 61 6d 2e | 0d 33 2f 39 2f 39 31 09 |program.|.3/9/91.|
|000007f0| 64 67 70 09 50 72 69 6e | 74 20 6f 75 74 20 6d 6f |dgp.Prin|t out mo|
|00000800| 64 65 20 6e 61 6d 65 73 | 2e 0d 34 2f 31 35 2f 39 |de names|..4/15/9|
|00000810| 31 09 64 67 70 09 4d 61 | 6b 65 20 73 75 72 65 20 |1.dgp.Ma|ke sure |
|00000820| 74 68 61 74 20 6e 65 77 | 20 70 61 6c 65 74 74 65 |that new| palette|
|00000830| 20 6d 61 6e 61 67 65 72 | 20 65 78 69 73 74 73 20 | manager| exists |
|00000840| 62 65 66 6f 72 65 20 63 | 61 6c 6c 69 6e 67 20 52 |before c|alling R|
|00000850| 65 73 74 6f 72 65 44 65 | 76 69 63 65 43 6c 75 74 |estoreDe|viceClut|
|00000860| 2e 0d 09 09 09 54 68 61 | 6e 6b 73 20 74 6f 20 43 |.....Tha|nks to C|
|00000870| 68 75 63 6b 20 53 74 65 | 69 6e 20 66 6f 72 20 61 |huck Ste|in for a|
|00000880| 6c 65 72 74 69 6e 67 20 | 6d 65 20 74 6f 20 74 68 |lerting |me to th|
|00000890| 65 20 62 75 67 2e 0d 36 | 2f 36 2f 39 31 09 64 67 |e bug..6|/6/91.dg|
|000008a0| 70 09 54 69 6d 65 20 61 | 6e 64 20 70 72 69 6e 74 |p.Time a|nd print|
|000008b0| 20 6f 75 74 20 68 6f 77 | 20 6c 6f 6e 67 20 47 44 | out how| long GD|
|000008c0| 53 65 74 45 6e 74 72 69 | 65 73 20 74 61 6b 65 73 |SetEntri|es takes|
|000008d0| 2e 0d 38 2f 32 34 2f 39 | 31 09 64 67 70 09 4d 61 |..8/24/9|1.dgp.Ma|
|000008e0| 64 65 20 63 6f 6d 70 61 | 74 69 62 6c 65 20 77 69 |de compa|tible wi|
|000008f0| 74 68 20 54 48 49 4e 4b | 20 43 20 35 2e 30 2e 0d |th THINK| C 5.0..|
|00000900| 31 2f 31 39 2f 39 32 09 | 64 67 70 09 43 6f 73 6d |1/19/92.|dgp.Cosm|
|00000910| 65 74 69 63 20 69 6d 70 | 72 6f 76 65 6d 65 6e 74 |etic imp|rovement|
|00000920| 73 20 74 6f 20 74 68 65 | 20 70 72 69 6e 74 6f 75 |s to the| printou|
|00000930| 74 2e 0d 32 2f 32 35 2f | 39 32 09 64 67 70 09 50 |t..2/25/|92.dgp.P|
|00000940| 75 74 20 74 69 6d 69 6e | 67 20 69 6e 66 6f 20 69 |ut timin|g info i|
|00000950| 6e 20 62 6f 6c 64 2e 0d | 38 2f 32 32 2f 39 32 09 |n bold..|8/22/92.|
|00000960| 64 67 70 20 44 69 73 70 | 6c 61 79 20 72 65 73 75 |dgp Disp|lay resu|
|00000970| 6c 74 73 20 6f 66 20 63 | 61 6c 6c 69 6e 67 20 47 |lts of c|alling G|
|00000980| 44 46 72 61 6d 65 52 61 | 74 65 28 29 20 61 6e 64 |DFrameRa|te() and|
|00000990| 20 47 44 46 72 61 6d 65 | 73 50 65 72 43 6c 75 74 | GDFrame|sPerClut|
|000009a0| 55 70 64 61 74 65 28 29 | 2e 0d 38 2f 32 37 2f 39 |Update()|..8/27/9|
|000009b0| 32 09 64 67 70 09 72 65 | 70 6c 61 63 65 20 53 79 |2.dgp.re|place Sy|
|000009c0| 73 45 6e 76 69 72 6f 6e | 73 28 29 20 62 79 20 47 |sEnviron|s() by G|
|000009d0| 65 73 74 61 6c 74 28 29 | 0d 31 32 2f 31 37 2f 39 |estalt()|.12/17/9|
|000009e0| 32 20 64 67 70 20 65 6e | 68 61 6e 63 65 64 20 74 |2 dgp en|hanced t|
|000009f0| 6f 20 77 6f 72 6b 20 77 | 69 74 68 20 61 6e 79 20 |o work w|ith any |
|00000a00| 64 61 63 20 73 69 7a 65 | 2e 0d 31 32 2f 33 30 2f |dac size|..12/30/|
|00000a10| 39 32 20 64 67 70 20 55 | 73 65 20 47 44 43 6c 75 |92 dgp U|se GDClu|
|00000a20| 74 53 69 7a 65 28 29 20 | 74 6f 20 64 65 74 65 72 |tSize() |to deter|
|00000a30| 6d 69 6e 65 20 63 6c 75 | 74 20 73 69 7a 65 2e 0d |mine clu|t size..|
|00000a40| 31 2f 36 2f 39 33 09 64 | 67 70 09 54 69 64 69 65 |1/6/93.d|gp.Tidie|
|00000a50| 64 20 75 70 20 74 68 65 | 20 47 65 74 45 6e 74 72 |d up the| GetEntr|
|00000a60| 69 65 73 2f 53 65 74 45 | 6e 74 72 69 65 73 20 63 |ies/SetE|ntries c|
|00000a70| 6f 64 65 2c 20 6e 6f 77 | 20 74 68 61 74 20 77 65 |ode, now| that we|
|00000a80| 20 64 6f 6e 27 74 20 68 | 61 76 65 0d 09 09 09 74 | don't h|ave....t|
|00000a90| 6f 20 74 65 73 74 20 66 | 6f 72 20 74 68 65 20 4d |o test f|or the M|
|00000aa0| 61 63 20 49 49 63 69 20 | 64 72 69 76 65 72 2e 0d |ac IIci |driver..|
|00000ab0| 09 09 09 53 6b 69 70 20 | 47 65 74 45 6e 74 72 69 |...Skip |GetEntri|
|00000ac0| 65 73 20 6f 6e 20 52 65 | 6c 61 78 20 64 72 69 76 |es on Re|lax driv|
|00000ad0| 65 72 2e 0d 31 2f 37 2f | 39 33 20 64 67 70 09 31 |er..1/7/|93 dgp.1|
|00000ae0| 2e 31 20 46 69 72 73 74 | 20 6e 75 6d 62 65 72 65 |.1 First| numbere|
|00000af0| 64 20 76 65 72 73 69 6f | 6e 2e 0d 31 2f 31 38 2f |d versio|n..1/18/|
|00000b00| 39 33 09 64 67 70 09 52 | 65 6e 61 6d 65 64 20 4d |93.dgp.R|enamed M|
|00000b10| 6f 64 65 4e 61 6d 65 28 | 29 20 74 6f 20 47 44 4d |odeName(|) to GDM|
|00000b20| 6f 64 65 4e 61 6d 65 28 | 29 2e 0d 31 2f 31 38 2f |odeName(|)..1/18/|
|00000b30| 39 33 09 64 67 70 09 4d | 6f 76 65 64 20 74 68 65 |93.dgp.M|oved the|
|00000b40| 20 63 6f 64 65 20 74 68 | 61 74 20 63 68 65 63 6b | code th|at check|
|00000b50| 65 64 20 66 6f 72 20 62 | 61 64 20 64 72 69 76 65 |ed for b|ad drive|
|00000b60| 72 73 20 69 6e 74 6f 20 | 47 44 47 65 74 45 6e 74 |rs into |GDGetEnt|
|00000b70| 72 69 65 73 28 29 20 69 | 6e 20 47 44 56 69 64 65 |ries() i|n GDVide|
|00000b80| 6f 2e 63 2c 0d 09 09 09 | 77 68 65 72 65 20 69 74 |o.c,....|where it|
|00000b90| 20 62 65 6c 6f 6e 67 73 | 2e 0d 32 2f 31 2f 39 33 | belongs|..2/1/93|
|00000ba0| 09 64 67 70 20 52 65 70 | 6f 72 74 20 77 68 65 74 |.dgp Rep|ort whet|
|00000bb0| 68 65 72 20 64 72 69 76 | 65 72 20 69 73 20 52 41 |her driv|er is RA|
|00000bc0| 4d 2d 20 6f 72 20 52 4f | 4d 2d 62 61 73 65 64 2e |M- or RO|M-based.|
|00000bd0| 0d 32 2f 35 2f 39 33 09 | 64 67 70 09 31 2e 32 2e |.2/5/93.|dgp.1.2.|
|00000be0| 20 52 65 63 6f 6d 70 69 | 6c 65 64 20 77 69 74 68 | Recompi|led with|
|00000bf0| 20 6c 61 74 65 73 74 20 | 76 65 72 73 69 6f 6e 20 | latest |version |
|00000c00| 6f 66 20 47 44 56 69 64 | 65 6f 2c 20 77 68 69 63 |of GDVid|eo, whic|
|00000c10| 68 20 6e 6f 77 20 73 75 | 70 70 6f 72 74 73 0d 09 |h now su|pports..|
|00000c20| 09 09 70 61 74 63 68 69 | 6e 67 20 6f 66 20 4d 61 |..patchi|ng of Ma|
|00000c30| 63 20 49 49 63 69 20 52 | 4f 4d 2d 62 61 73 65 64 |c IIci R|OM-based|
|00000c40| 20 64 72 69 76 65 72 2e | 0d 32 2f 36 2f 39 33 09 | driver.|.2/6/93.|
|00000c50| 64 67 70 09 31 2e 33 2e | 20 52 65 70 6f 72 74 20 |dgp.1.3.| Report |
|00000c60| 52 4f 4d 20 76 65 72 73 | 69 6f 6e 2c 20 69 66 20 |ROM vers|ion, if |
|00000c70| 64 72 69 76 65 72 20 69 | 73 20 52 4f 4d 2d 62 61 |driver i|s ROM-ba|
|00000c80| 73 65 64 2e 0d 32 2f 37 | 2f 39 33 09 64 67 70 09 |sed..2/7|/93.dgp.|
|00000c90| 31 2e 34 2e 20 52 65 63 | 6f 6d 70 69 6c 65 64 20 |1.4. Rec|ompiled |
|00000ca0| 61 66 74 65 72 20 66 69 | 78 69 6e 67 20 65 6e 64 |after fi|xing end|
|00000cb0| 6c 65 73 73 20 6c 6f 6f | 70 20 69 6e 20 50 61 74 |less loo|p in Pat|
|00000cc0| 63 68 4d 61 63 49 49 63 | 69 56 69 64 65 6f 44 72 |chMacIIc|iVideoDr|
|00000cd0| 69 76 65 72 0d 09 09 09 | 69 6e 20 47 44 56 69 64 |iver....|in GDVid|
|00000ce0| 65 6f 2e 63 0d 32 2f 31 | 38 2f 39 33 09 64 67 70 |eo.c.2/1|8/93.dgp|
|00000cf0| 09 31 2e 35 20 4d 61 64 | 65 20 63 6f 6d 70 61 74 |.1.5 Mad|e compat|
|00000d00| 69 62 6c 65 20 77 69 74 | 68 20 50 6f 77 65 72 42 |ible wit|h PowerB|
|00000d10| 6f 6f 6b 20 31 36 30 2c | 20 62 79 20 6f 6d 69 74 |ook 160,| by omit|
|00000d20| 74 69 6e 67 20 63 61 6c | 6c 20 74 6f 20 47 44 53 |ting cal|l to GDS|
|00000d30| 65 74 49 6e 74 65 72 72 | 75 70 74 2e 0d 32 2f 32 |etInterr|upt..2/2|
|00000d40| 32 2f 39 33 09 64 67 70 | 09 31 2e 36 20 4e 6f 20 |2/93.dgp|.1.6 No |
|00000d50| 6c 6f 6e 67 65 72 20 61 | 73 73 75 6d 65 20 74 68 |longer a|ssume th|
|00000d60| 61 74 20 64 72 69 76 65 | 72 20 75 73 65 73 20 61 |at drive|r uses a|
|00000d70| 20 76 65 72 73 69 6f 6e | 20 30 20 67 61 6d 6d 61 | version| 0 gamma|
|00000d80| 20 74 61 62 6c 65 2e 0d | 2a 2f 0d 0d 23 64 65 66 | table..|*/..#def|
|00000d90| 69 6e 65 20 47 41 4d 4d | 41 5f 54 41 42 4c 45 09 |ine GAMM|A_TABLE.|
|00000da0| 31 20 2f 2a 20 54 52 55 | 45 20 6f 72 20 46 41 4c |1 /* TRU|E or FAL|
|00000db0| 53 45 2e 20 50 72 69 6e | 74 6f 75 74 20 6f 66 20 |SE. Prin|tout of |
|00000dc0| 67 61 6d 6d 61 20 74 61 | 62 6c 65 2e 20 2a 2f 0d |gamma ta|ble. */.|
|00000dd0| 23 64 65 66 69 6e 65 20 | 56 45 52 53 49 4f 4e 20 |#define |VERSION |
|00000de0| 22 31 2e 36 22 0d 0d 23 | 69 6e 63 6c 75 64 65 20 |"1.6"..#|include |
|00000df0| 22 56 69 64 65 6f 54 6f | 6f 6c 62 6f 78 2e 68 22 |"VideoTo|olbox.h"|
|00000e00| 0d 23 69 6e 63 6c 75 64 | 65 20 3c 61 73 73 65 72 |.#includ|e <asser|
|00000e10| 74 2e 68 3e 0d 23 69 6e | 63 6c 75 64 65 20 3c 46 |t.h>.#in|clude <F|
|00000e20| 69 6c 65 73 2e 68 3e 0d | 23 69 66 20 54 48 49 4e |iles.h>.|#if THIN|
|00000e30| 4b 5f 43 0d 09 23 69 6e | 63 6c 75 64 65 20 3c 4c |K_C..#in|clude <L|
|00000e40| 6f 4d 65 6d 2e 68 3e 0d | 23 65 6c 73 65 0d 09 73 |oMem.h>.|#else..s|
|00000e50| 68 6f 72 74 20 4d 42 61 | 72 48 65 69 67 68 74 20 |hort MBa|rHeight |
|00000e60| 3a 20 30 78 42 41 41 3b | 0d 23 65 6e 64 69 66 0d |: 0xBAA;|.#endif.|
|00000e70| 23 69 6e 63 6c 75 64 65 | 20 3c 4d 65 6e 75 73 2e |#include| <Menus.|
|00000e80| 68 3e 0d 0d 69 6e 74 20 | 50 61 74 63 68 4d 61 63 |h>..int |PatchMac|
|00000e90| 49 49 63 69 56 69 64 65 | 6f 44 72 69 76 65 72 28 |IIciVide|oDriver(|
|00000ea0| 76 6f 69 64 29 3b 0d 23 | 64 65 66 69 6e 65 20 64 |void);.#|define d|
|00000eb0| 52 41 4d 42 61 73 65 64 | 09 09 30 78 30 30 34 30 |RAMBased|..0x0040|
|00000ec0| 0d 0d 23 64 65 66 69 6e | 65 20 53 43 52 45 45 4e |..#defin|e SCREEN|
|00000ed0| 53 20 38 0d 0d 76 6f 69 | 64 20 6d 61 69 6e 28 76 |S 8..voi|d main(v|
|00000ee0| 6f 69 64 29 3b 0d 76 6f | 69 64 20 45 72 72 6f 72 |oid);.vo|id Error|
|00000ef0| 28 69 6e 74 20 65 72 72 | 6f 72 29 3b 0d 0d 45 76 |(int err|or);..Ev|
|00000f00| 65 6e 74 52 65 63 6f 72 | 64 20 74 68 65 45 76 65 |entRecor|d theEve|
|00000f10| 6e 74 3b 0d 0d 76 6f 69 | 64 20 6d 61 69 6e 28 29 |nt;..voi|d main()|
|00000f20| 0d 7b 0d 09 73 74 61 74 | 69 63 20 57 69 6e 64 6f |.{..stat|ic Windo|
|00000f30| 77 50 74 72 20 77 69 6e | 64 6f 77 5b 53 43 52 45 |wPtr win|dow[SCRE|
|00000f40| 45 4e 53 5d 2c 6f 6c 64 | 50 6f 72 74 3b 0d 09 73 |ENS],old|Port;..s|
|00000f50| 74 61 74 69 63 20 43 6f | 6c 6f 72 53 70 65 63 20 |tatic Co|lorSpec |
|00000f60| 6d 79 54 61 62 6c 65 5b | 31 30 32 34 5d 3b 09 2f |myTable[|1024];./|
|00000f70| 2f 20 45 6e 6f 75 67 68 | 20 66 6f 72 20 31 30 2d |/ Enough| for 10-|
|00000f80| 62 69 74 20 64 61 63 73 | 0d 09 43 6f 6c 6f 72 53 |bit dacs|..ColorS|
|00000f90| 70 65 63 20 62 6c 61 63 | 6b 3d 7b 30 2c 30 2c 30 |pec blac|k={0,0,0|
|00000fa0| 2c 30 7d 3b 0d 09 57 69 | 6e 64 6f 77 50 74 72 20 |,0};..Wi|ndowPtr |
|00000fb0| 74 68 65 57 69 6e 64 6f | 77 3b 0d 09 47 44 48 61 |theWindo|w;..GDHa|
|00000fc0| 6e 64 6c 65 20 64 65 76 | 69 63 65 3b 0d 09 73 68 |ndle dev|ice;..sh|
|00000fd0| 6f 72 74 20 69 2c 6a 2c | 65 72 72 6f 72 2c 73 63 |ort i,j,|error,sc|
|00000fe0| 72 65 65 6e 2c 63 74 53 | 69 7a 65 2c 6d 6f 64 65 |reen,ctS|ize,mode|
|00000ff0| 2c 70 61 67 65 2c 70 61 | 67 65 73 2c 73 74 61 72 |,page,pa|ges,star|
|00001000| 74 2c 63 6f 75 6e 74 2c | 70 69 78 65 6c 53 69 7a |t,count,|pixelSiz|
|00001010| 65 2c 74 79 70 65 2c 63 | 6c 75 74 53 69 7a 65 3b |e,type,c|lutSize;|
|00001020| 0d 09 73 68 6f 72 74 20 | 74 65 78 74 53 69 7a 65 |..short |textSize|
|00001030| 3d 31 32 2c 64 61 63 53 | 69 7a 65 2c 64 61 74 61 |=12,dacS|ize,data|
|00001040| 53 69 7a 65 2c 64 61 74 | 61 43 6e 74 2c 66 6f 6e |Size,dat|aCnt,fon|
|00001050| 74 4e 75 6d 62 65 72 2c | 6e 65 77 46 6f 6e 74 4e |tNumber,|newFontN|
|00001060| 75 6d 62 65 72 2c 77 68 | 65 72 65 3b 0d 09 73 68 |umber,wh|ere;..sh|
|00001070| 6f 72 74 20 67 61 6d 6d | 61 44 61 74 61 57 69 64 |ort gamm|aDataWid|
|00001080| 74 68 3b 0d 09 6c 6f 6e | 67 20 73 79 73 74 65 6d |th;..lon|g system|
|00001090| 56 65 72 73 69 6f 6e 3d | 30 3b 0d 09 42 6f 6f 6c |Version=|0;..Bool|
|000010a0| 65 61 6e 20 66 6c 61 67 | 2c 6b 65 65 70 57 61 69 |ean flag|,keepWai|
|000010b0| 74 69 6e 67 3b 0d 09 47 | 61 6d 6d 61 54 62 6c 20 |ting;..G|ammaTbl |
|000010c0| 2a 67 61 6d 6d 61 3d 4e | 55 4c 4c 2c 2a 6d 79 47 |*gamma=N|ULL,*myG|
|000010d0| 61 6d 6d 61 3d 4e 55 4c | 4c 3b 0d 09 63 68 61 72 |amma=NUL|L;..char|
|000010e0| 20 2a 6e 61 6d 65 3b 0d | 09 50 74 72 20 62 61 73 | *name;.|.Ptr bas|
|000010f0| 65 41 64 64 72 3b 0d 09 | 52 65 63 74 20 6d 79 52 |eAddr;..|Rect myR|
|00001100| 65 63 74 3b 0d 09 64 6f | 75 62 6c 65 20 66 3b 0d |ect;..do|uble f;.|
|00001110| 09 75 6e 73 69 67 6e 65 | 64 20 63 68 61 72 20 2a |.unsigne|d char *|
|00001120| 62 79 74 65 3b 0d 09 75 | 6e 73 69 67 6e 65 64 20 |byte;..u|nsigned |
|00001130| 73 68 6f 72 74 20 2a 77 | 6f 72 64 3b 0d 09 42 6f |short *w|ord;..Bo|
|00001140| 6f 6c 65 61 6e 20 70 61 | 74 63 68 3b 0d 09 63 68 |olean pa|tch;..ch|
|00001150| 61 72 20 74 79 70 65 4e | 61 6d 65 5b 5d 5b 31 36 |ar typeN|ame[][16|
|00001160| 5d 3d 7b 22 63 6c 75 74 | 54 79 70 65 22 2c 22 66 |]={"clut|Type","f|
|00001170| 69 78 65 64 54 79 70 65 | 22 2c 22 64 69 72 65 63 |ixedType|","direc|
|00001180| 74 54 79 70 65 22 7d 3b | 0d 09 63 68 61 72 20 6d |tType"};|..char m|
|00001190| 6f 64 65 4e 61 6d 65 5b | 5d 5b 31 38 5d 3d 7b 22 |odeName[|][18]={"|
|000011a0| 6f 6e 65 42 69 74 4d 6f | 64 65 22 2c 22 74 77 6f |oneBitMo|de","two|
|000011b0| 42 69 74 4d 6f 64 65 22 | 2c 22 66 6f 75 72 42 69 |BitMode"|,"fourBi|
|000011c0| 74 4d 6f 64 65 22 2c 22 | 65 69 67 68 74 42 69 74 |tMode","|eightBit|
|000011d0| 4d 6f 64 65 22 0d 09 09 | 2c 22 73 69 78 74 65 65 |Mode"...|,"sixtee|
|000011e0| 6e 42 69 74 4d 6f 64 65 | 22 2c 22 74 68 69 72 74 |nBitMode|","thirt|
|000011f0| 79 54 77 6f 42 69 74 4d | 6f 64 65 22 7d 3b 0d 09 |yTwoBitM|ode"};..|
|00001200| 41 75 78 44 43 45 20 2a | 2a 61 75 78 44 43 45 48 |AuxDCE *|*auxDCEH|
|00001210| 61 6e 64 6c 65 3b 0d 09 | 6c 6f 6e 67 20 73 69 7a |andle;..|long siz|
|00001220| 65 3b 0d 09 50 74 72 20 | 70 74 72 3b 0d 09 6c 6f |e;..Ptr |ptr;..lo|
|00001230| 6e 67 20 72 6f 6d 53 69 | 7a 65 2c 72 6f 6d 56 65 |ng romSi|ze,romVe|
|00001240| 72 73 69 6f 6e 3b 0d 09 | 09 09 0d 09 52 65 71 75 |rsion;..|....Requ|
|00001250| 69 72 65 28 67 65 73 74 | 61 6c 74 38 42 69 74 51 |ire(gest|alt8BitQ|
|00001260| 44 29 3b 0d 09 49 6e 69 | 74 47 72 61 66 28 26 71 |D);..Ini|tGraf(&q|
|00001270| 64 2e 74 68 65 50 6f 72 | 74 29 3b 0d 09 49 6e 69 |d.thePor|t);..Ini|
|00001280| 74 46 6f 6e 74 73 28 29 | 3b 0d 09 49 6e 69 74 57 |tFonts()|;..InitW|
|00001290| 69 6e 64 6f 77 73 28 29 | 3b 0d 09 49 6e 69 74 43 |indows()|;..InitC|
|000012a0| 75 72 73 6f 72 28 29 3b | 0d 09 47 65 74 50 6f 72 |ursor();|..GetPor|
|000012b0| 74 28 26 6f 6c 64 50 6f | 72 74 29 3b 0d 09 5f 61 |t(&oldPo|rt);.._a|
|000012c0| 74 65 78 69 74 28 52 65 | 73 74 6f 72 65 43 6c 75 |texit(Re|storeClu|
|000012d0| 74 73 29 3b 0d 09 70 61 | 74 63 68 3d 50 61 74 63 |ts);..pa|tch=Patc|
|000012e0| 68 4d 61 63 49 49 63 69 | 56 69 64 65 6f 44 72 69 |hMacIIci|VideoDri|
|000012f0| 76 65 72 28 29 3b 0d 09 | 66 6f 72 28 73 63 72 65 |ver();..|for(scre|
|00001300| 65 6e 3d 30 3b 73 63 72 | 65 65 6e 3c 53 43 52 45 |en=0;scr|een<SCRE|
|00001310| 45 4e 53 3b 73 63 72 65 | 65 6e 2b 2b 29 7b 0d 09 |ENS;scre|en++){..|
|00001320| 09 53 65 74 50 6f 72 74 | 28 6f 6c 64 50 6f 72 74 |.SetPort|(oldPort|
|00001330| 29 3b 0d 09 09 64 65 76 | 69 63 65 20 3d 20 47 65 |);...dev|ice = Ge|
|00001340| 74 53 63 72 65 65 6e 44 | 65 76 69 63 65 28 73 63 |tScreenD|evice(sc|
|00001350| 72 65 65 6e 29 3b 0d 09 | 09 69 66 28 64 65 76 69 |reen);..|.if(devi|
|00001360| 63 65 20 3d 3d 20 4e 55 | 4c 4c 29 20 62 72 65 61 |ce == NU|LL) brea|
|00001370| 6b 3b 0d 0d 09 09 2f 2a | 0d 09 09 46 6f 72 20 72 |k;..../*|...For r|
|00001380| 65 61 73 6f 6e 73 20 74 | 68 61 74 20 49 20 64 6f |easons t|hat I do|
|00001390| 6e 27 74 20 75 6e 64 65 | 72 73 74 61 6e 64 2c 20 |n't unde|rstand, |
|000013a0| 63 61 6c 6c 69 6e 67 20 | 47 44 47 72 61 79 50 61 |calling |GDGrayPa|
|000013b0| 67 65 28 29 20 66 69 72 | 73 74 2c 0d 09 09 69 6d |ge() fir|st,...im|
|000013c0| 6d 65 64 69 61 74 65 6c | 79 20 61 66 74 65 72 20 |mediatel|y after |
|000013d0| 72 65 62 6f 6f 74 69 6e | 67 2c 20 72 65 73 75 6c |rebootin|g, resul|
|000013e0| 74 73 20 69 6e 20 61 20 | 63 72 61 73 68 20 77 68 |ts in a |crash wh|
|000013f0| 65 6e 20 75 73 69 6e 67 | 20 61 6e 20 41 70 70 6c |en using| an Appl|
|00001400| 65 27 73 0d 09 09 6f 6c | 64 20 22 54 6f 62 79 22 |e's...ol|d "Toby"|
|00001410| 20 76 69 64 65 6f 20 63 | 61 72 64 2e 20 50 72 65 | video c|ard. Pre|
|00001420| 63 65 64 69 6e 67 20 74 | 68 65 20 63 61 6c 6c 20 |ceding t|he call |
|00001430| 62 79 0d 09 09 61 20 63 | 61 6c 6c 20 74 6f 20 47 |by...a c|all to G|
|00001440| 44 53 65 74 4d 6f 64 65 | 28 29 20 63 75 72 65 73 |DSetMode|() cures|
|00001450| 20 74 68 65 20 73 79 6d | 70 74 6f 6d 2e 20 4c 61 | the sym|ptom. La|
|00001460| 74 65 72 20 63 61 6c 6c | 73 20 74 6f 20 47 44 47 |ter call|s to GDG|
|00001470| 72 61 79 50 61 67 65 28 | 29 0d 09 09 73 65 65 6d |rayPage(|)...seem|
|00001480| 20 74 6f 20 61 6c 77 61 | 79 73 20 77 6f 72 6b 20 | to alwa|ys work |
|00001490| 66 69 6e 65 2e 20 50 72 | 65 73 75 6d 61 62 6c 79 |fine. Pr|esumably|
|000014a0| 20 73 6f 6d 65 74 68 69 | 6e 67 20 69 73 20 6e 6f | somethi|ng is no|
|000014b0| 74 20 70 72 6f 70 65 72 | 6c 79 20 69 6e 69 74 69 |t proper|ly initi|
|000014c0| 61 6c 69 7a 65 64 0d 09 | 09 69 6e 20 74 68 65 20 |alized..|.in the |
|000014d0| 41 70 70 6c 65 20 76 69 | 64 65 6f 20 63 61 72 64 |Apple vi|deo card|
|000014e0| 20 64 72 69 76 65 72 2e | 20 28 54 6f 62 79 20 63 | driver.| (Toby c|
|000014f0| 61 72 64 20 64 72 69 76 | 65 72 20 76 65 72 73 69 |ard driv|er versi|
|00001500| 6f 6e 20 34 2e 29 0d 09 | 09 2a 2f 0d 09 09 65 72 |on 4.)..|.*/...er|
|00001510| 72 6f 72 3d 47 44 47 65 | 74 4d 6f 64 65 28 64 65 |ror=GDGe|tMode(de|
|00001520| 76 69 63 65 2c 26 6d 6f | 64 65 2c 26 70 61 67 65 |vice,&mo|de,&page|
|00001530| 2c 26 62 61 73 65 41 64 | 64 72 29 3b 0d 09 09 65 |,&baseAd|dr);...e|
|00001540| 72 72 6f 72 3d 47 44 53 | 65 74 4d 6f 64 65 28 64 |rror=GDS|etMode(d|
|00001550| 65 76 69 63 65 2c 6d 6f | 64 65 2c 70 61 67 65 2c |evice,mo|de,page,|
|00001560| 26 62 61 73 65 41 64 64 | 72 29 3b 0d 09 09 69 66 |&baseAdd|r);...if|
|00001570| 28 4e 65 77 50 61 6c 65 | 74 74 65 4d 61 6e 61 67 |(NewPale|tteManag|
|00001580| 65 72 28 29 29 52 65 73 | 74 6f 72 65 44 65 76 69 |er())Res|toreDevi|
|00001590| 63 65 43 6c 75 74 28 64 | 65 76 69 63 65 29 3b 0d |ceClut(d|evice);.|
|000015a0| 09 09 0d 09 09 65 72 72 | 6f 72 3d 47 44 47 72 61 |.....err|or=GDGra|
|000015b0| 79 50 61 67 65 28 64 65 | 76 69 63 65 2c 70 61 67 |yPage(de|vice,pag|
|000015c0| 65 29 3b 0d 09 09 69 66 | 28 73 63 72 65 65 6e 3d |e);...if|(screen=|
|000015d0| 3d 30 29 44 72 61 77 4d | 65 6e 75 42 61 72 28 29 |=0)DrawM|enuBar()|
|000015e0| 3b 09 2f 2a 20 72 65 73 | 74 6f 72 65 20 6d 65 6e |;./* res|tore men|
|000015f0| 75 20 62 61 72 20 61 66 | 74 65 72 20 47 72 61 79 |u bar af|ter Gray|
|00001600| 53 63 72 65 65 6e 20 2a | 2f 0d 0d 09 09 2f 2a 20 |Screen *|/..../* |
|00001610| 4f 70 65 6e 20 77 69 6e | 64 6f 77 20 2a 2f 0d 09 |Open win|dow */..|
|00001620| 09 6d 79 52 65 63 74 20 | 3d 20 28 2a 64 65 76 69 |.myRect |= (*devi|
|00001630| 63 65 29 2d 3e 67 64 52 | 65 63 74 3b 09 2f 2a 20 |ce)->gdR|ect;./* |
|00001640| 72 65 63 74 20 6f 66 20 | 64 65 73 69 72 65 64 20 |rect of |desired |
|00001650| 73 63 72 65 65 6e 20 69 | 6e 20 67 6c 6f 62 61 6c |screen i|n global|
|00001660| 20 63 6f 6f 72 64 69 6e | 61 74 65 73 20 2a 2f 0d | coordin|ates */.|
|00001670| 09 09 69 66 28 73 63 72 | 65 65 6e 3d 3d 30 29 6d |..if(scr|een==0)m|
|00001680| 79 52 65 63 74 2e 74 6f | 70 2b 3d 4d 42 61 72 48 |yRect.to|p+=MBarH|
|00001690| 65 69 67 68 74 3b 09 09 | 2f 2a 20 61 6c 6c 6f 77 |eight;..|/* allow|
|000016a0| 20 66 6f 72 20 6d 65 6e | 75 20 62 61 72 20 2a 2f | for men|u bar */|
|000016b0| 0d 09 09 6d 79 52 65 63 | 74 2e 74 6f 70 2b 3d 31 |...myRec|t.top+=1|
|000016c0| 37 3b 09 09 09 09 09 09 | 09 09 2f 2a 20 61 6c 6c |7;......|../* all|
|000016d0| 6f 77 20 66 6f 72 20 74 | 69 74 6c 65 20 62 61 72 |ow for t|itle bar|
|000016e0| 20 2a 2f 0d 09 09 49 6e | 73 65 74 52 65 63 74 28 | */...In|setRect(|
|000016f0| 26 6d 79 52 65 63 74 2c | 31 2c 31 29 3b 0d 09 09 |&myRect,|1,1);...|
|00001700| 6e 61 6d 65 3d 47 44 43 | 61 72 64 4e 61 6d 65 28 |name=GDC|ardName(|
|00001710| 64 65 76 69 63 65 29 3b | 0d 09 09 43 74 6f 50 73 |device);|...CtoPs|
|00001720| 74 72 28 6e 61 6d 65 29 | 3b 0d 09 09 77 69 6e 64 |tr(name)|;...wind|
|00001730| 6f 77 5b 73 63 72 65 65 | 6e 5d 3d 0d 09 09 09 4e |ow[scree|n]=....N|
|00001740| 65 77 43 57 69 6e 64 6f | 77 28 4e 55 4c 4c 2c 26 |ewCWindo|w(NULL,&|
|00001750| 6d 79 52 65 63 74 2c 28 | 75 6e 73 69 67 6e 65 64 |myRect,(|unsigned|
|00001760| 20 63 68 61 72 20 2a 29 | 6e 61 6d 65 2c 54 52 55 | char *)|name,TRU|
|00001770| 45 2c 64 6f 63 75 6d 65 | 6e 74 50 72 6f 63 2c 28 |E,docume|ntProc,(|
|00001780| 57 69 6e 64 6f 77 50 74 | 72 29 20 2d 31 4c 2c 54 |WindowPt|r) -1L,T|
|00001790| 52 55 45 2c 31 32 33 4c | 29 3b 0d 0d 09 09 2f 2a |RUE,123L|);..../*|
|000017a0| 20 57 72 69 74 65 20 69 | 6e 20 77 69 6e 64 6f 77 | Write i|n window|
|000017b0| 20 2a 2f 0d 09 09 53 65 | 74 50 6f 72 74 28 77 69 | */...Se|tPort(wi|
|000017c0| 6e 64 6f 77 5b 73 63 72 | 65 65 6e 5d 29 3b 0d 09 |ndow[scr|een]);..|
|000017d0| 09 6d 79 52 65 63 74 3d | 77 69 6e 64 6f 77 5b 73 |.myRect=|window[s|
|000017e0| 63 72 65 65 6e 5d 2d 3e | 70 6f 72 74 52 65 63 74 |creen]->|portRect|
|000017f0| 3b 0d 09 09 47 65 74 46 | 4e 75 6d 28 22 5c 70 54 |;...GetF|Num("\pT|
|00001800| 69 6d 65 73 22 2c 26 66 | 6f 6e 74 4e 75 6d 62 65 |imes",&f|ontNumbe|
|00001810| 72 29 3b 0d 09 09 54 65 | 78 74 46 6f 6e 74 28 66 |r);...Te|xtFont(f|
|00001820| 6f 6e 74 4e 75 6d 62 65 | 72 29 3b 0d 09 09 54 65 |ontNumbe|r);...Te|
|00001830| 78 74 53 69 7a 65 28 74 | 65 78 74 53 69 7a 65 29 |xtSize(t|extSize)|
|00001840| 3b 0d 09 09 44 72 61 77 | 50 72 69 6e 74 66 28 22 |;...Draw|Printf("|
|00001850| 5c 6e 22 29 3b 0d 09 09 | 69 66 28 73 63 72 65 65 |\n");...|if(scree|
|00001860| 6e 3d 3d 30 29 44 72 61 | 77 50 72 69 6e 74 66 28 |n==0)Dra|wPrintf(|
|00001870| 22 57 65 6c 63 6f 6d 65 | 20 74 6f 20 54 65 73 74 |"Welcome| to Test|
|00001880| 47 44 56 69 64 65 6f 20 | 22 20 56 45 52 53 49 4f |GDVideo |" VERSIO|
|00001890| 4e 20 22 2e 20 4e 6f 77 | 20 74 65 73 74 69 6e 67 |N ". Now| testing|
|000018a0| 20 61 6c 6c 20 79 6f 75 | 72 20 76 69 64 65 6f 20 | all you|r video |
|000018b0| 64 72 69 76 65 72 73 2e | 22 0d 09 09 22 20 50 6c |drivers.|"..." Pl|
|000018c0| 65 61 73 65 20 72 65 70 | 6f 72 74 20 61 6e 79 20 |ease rep|ort any |
|000018d0| 63 72 61 73 68 20 74 6f | 20 64 65 6e 69 73 5f 70 |crash to| denis_p|
|000018e0| 65 6c 6c 69 40 69 73 72 | 2e 73 79 72 2e 65 64 75 |elli@isr|.syr.edu|
|000018f0| 5c 6e 22 29 3b 0d 0d 09 | 09 44 72 61 77 50 72 69 |\n");...|.DrawPri|
|00001900| 6e 74 66 28 22 44 72 69 | 76 65 72 3a 20 25 23 73 |ntf("Dri|ver: %#s|
|00001910| 20 76 65 72 73 69 6f 6e | 20 25 64 22 2c 47 44 4e | version| %d",GDN|
|00001920| 61 6d 65 28 64 65 76 69 | 63 65 29 2c 47 44 56 65 |ame(devi|ce),GDVe|
|00001930| 72 73 69 6f 6e 28 64 65 | 76 69 63 65 29 29 3b 0d |rsion(de|vice));.|
|00001940| 09 09 61 75 78 44 43 45 | 48 61 6e 64 6c 65 20 3d |..auxDCE|Handle =|
|00001950| 20 28 41 75 78 44 43 45 | 20 2a 2a 29 20 47 65 74 | (AuxDCE| **) Get|
|00001960| 44 43 74 6c 45 6e 74 72 | 79 28 28 2a 64 65 76 69 |DCtlEntr|y((*devi|
|00001970| 63 65 29 2d 3e 67 64 52 | 65 66 4e 75 6d 29 3b 0d |ce)->gdR|efNum);.|
|00001980| 09 09 69 66 28 28 2a 2a | 61 75 78 44 43 45 48 61 |..if((**|auxDCEHa|
|00001990| 6e 64 6c 65 29 2e 64 43 | 74 6c 46 6c 61 67 73 20 |ndle).dC|tlFlags |
|000019a0| 26 20 64 52 41 4d 42 61 | 73 65 64 29 7b 0d 09 09 |& dRAMBa|sed){...|
|000019b0| 09 2f 2a 20 52 41 4d 2d | 62 61 73 65 64 20 64 72 |./* RAM-|based dr|
|000019c0| 69 76 65 72 2e 20 2a 2f | 0d 09 09 09 73 69 7a 65 |iver. */|....size|
|000019d0| 3d 47 65 74 48 61 6e 64 | 6c 65 53 69 7a 65 28 28 |=GetHand|leSize((|
|000019e0| 48 61 6e 64 6c 65 29 28 | 2a 2a 61 75 78 44 43 45 |Handle)(|**auxDCE|
|000019f0| 48 61 6e 64 6c 65 29 2e | 64 43 74 6c 44 72 69 76 |Handle).|dCtlDriv|
|00001a00| 65 72 29 3b 0d 09 09 09 | 44 72 61 77 50 72 69 6e |er);....|DrawPrin|
|00001a10| 74 66 28 22 2c 20 6f 63 | 63 75 70 79 69 6e 67 20 |tf(", oc|cupying |
|00001a20| 25 6c 64 20 62 79 74 65 | 73 20 69 6e 20 52 41 4d |%ld byte|s in RAM|
|00001a30| 2e 22 2c 73 69 7a 65 29 | 3b 0d 09 09 7d 65 6c 73 |.",size)|;...}els|
|00001a40| 65 7b 0d 09 09 09 2f 2a | 20 52 4f 4d 2d 62 61 73 |e{..../*| ROM-bas|
|00001a50| 65 64 20 64 72 69 76 65 | 72 2e 20 2a 2f 0d 09 09 |ed drive|r. */...|
|00001a60| 09 70 74 72 3d 28 2a 2a | 61 75 78 44 43 45 48 61 |.ptr=(**|auxDCEHa|
|00001a70| 6e 64 6c 65 29 2e 64 43 | 74 6c 44 72 69 76 65 72 |ndle).dC|tlDriver|
|00001a80| 3b 0d 09 09 09 47 65 73 | 74 61 6c 74 28 67 65 73 |;....Ges|talt(ges|
|00001a90| 74 61 6c 74 52 4f 4d 53 | 69 7a 65 2c 26 72 6f 6d |taltROMS|ize,&rom|
|00001aa0| 53 69 7a 65 29 3b 0d 09 | 09 09 47 65 73 74 61 6c |Size);..|..Gestal|
|00001ab0| 74 28 67 65 73 74 61 6c | 74 52 4f 4d 56 65 72 73 |t(gestal|tROMVers|
|00001ac0| 69 6f 6e 2c 26 72 6f 6d | 56 65 72 73 69 6f 6e 29 |ion,&rom|Version)|
|00001ad0| 3b 0d 09 09 09 44 72 61 | 77 50 72 69 6e 74 66 28 |;....Dra|wPrintf(|
|00001ae0| 22 2c 20 61 74 20 30 78 | 25 6c 78 20 69 6e 20 52 |", at 0x|%lx in R|
|00001af0| 4f 4d 2e 20 25 6c 64 20 | 4b 20 52 4f 4d 20 76 65 |OM. %ld |K ROM ve|
|00001b00| 72 73 69 6f 6e 20 25 6c | 64 20 28 25 6c 64 29 2e |rsion %l|d (%ld).|
|00001b10| 22 0d 09 09 09 09 2c 70 | 74 72 2c 72 6f 6d 53 69 |".....,p|tr,romSi|
|00001b20| 7a 65 2f 31 30 32 34 2c | 72 6f 6d 56 65 72 73 69 |ze/1024,|romVersi|
|00001b30| 6f 6e 25 32 35 36 2c 28 | 72 6f 6d 56 65 72 73 69 |on%256,(|romVersi|
|00001b40| 6f 6e 2f 32 35 36 29 29 | 3b 0d 09 09 7d 0d 09 09 |on/256))|;...}...|
|00001b50| 44 72 61 77 50 72 69 6e | 74 66 28 22 5c 6e 22 29 |DrawPrin|tf("\n")|
|00001b60| 3b 0d 09 09 69 66 28 47 | 65 74 44 65 76 69 63 65 |;...if(G|etDevice|
|00001b70| 53 6c 6f 74 28 64 65 76 | 69 63 65 29 3e 3d 30 29 |Slot(dev|ice)>=0)|
|00001b80| 44 72 61 77 50 72 69 6e | 74 66 28 22 53 6c 6f 74 |DrawPrin|tf("Slot|
|00001b90| 3a 20 25 64 5c 6e 22 2c | 47 65 74 44 65 76 69 63 |: %d\n",|GetDevic|
|00001ba0| 65 53 6c 6f 74 28 64 65 | 76 69 63 65 29 29 3b 0d |eSlot(de|vice));.|
|00001bb0| 09 09 65 6c 73 65 20 44 | 72 61 77 50 72 69 6e 74 |..else D|rawPrint|
|00001bc0| 66 28 22 53 6c 6f 74 3a | 20 6e 6f 6e 65 5c 6e 22 |f("Slot:| none\n"|
|00001bd0| 29 3b 0d 09 0d 09 09 44 | 72 61 77 50 72 69 6e 74 |);.....D|rawPrint|
|00001be0| 66 28 22 47 72 61 79 50 | 61 67 65 3a 20 22 29 3b |f("GrayP|age: ");|
|00001bf0| 0d 09 09 69 66 28 65 72 | 72 6f 72 29 20 45 72 72 |...if(er|ror) Err|
|00001c00| 6f 72 28 65 72 72 6f 72 | 29 3b 0d 09 09 65 6c 73 |or(error|);...els|
|00001c10| 65 20 44 72 61 77 50 72 | 69 6e 74 66 28 22 6f 6b |e DrawPr|intf("ok|
|00001c20| 5c 6e 22 29 3b 0d 0d 09 | 09 44 72 61 77 50 72 69 |\n");...|.DrawPri|
|00001c30| 6e 74 66 28 22 47 65 74 | 4d 6f 64 65 3a 20 22 29 |ntf("Get|Mode: ")|
|00001c40| 3b 0d 09 09 65 72 72 6f | 72 3d 47 44 47 65 74 4d |;...erro|r=GDGetM|
|00001c50| 6f 64 65 28 64 65 76 69 | 63 65 2c 26 6d 6f 64 65 |ode(devi|ce,&mode|
|00001c60| 2c 26 70 61 67 65 2c 26 | 62 61 73 65 41 64 64 72 |,&page,&|baseAddr|
|00001c70| 29 3b 0d 09 09 69 66 28 | 65 72 72 6f 72 29 20 45 |);...if(|error) E|
|00001c80| 72 72 6f 72 28 65 72 72 | 6f 72 29 3b 0d 09 09 65 |rror(err|or);...e|
|00001c90| 6c 73 65 20 44 72 61 77 | 50 72 69 6e 74 66 28 22 |lse Draw|Printf("|
|00001ca0| 25 73 20 70 61 67 65 20 | 25 64 20 62 61 73 65 20 |%s page |%d base |
|00001cb0| 61 64 64 72 65 73 73 20 | 30 78 25 6c 58 5c 6e 22 |address |0x%lX\n"|
|00001cc0| 2c 47 44 4d 6f 64 65 4e | 61 6d 65 28 6d 6f 64 65 |,GDModeN|ame(mode|
|00001cd0| 29 2c 70 61 67 65 2c 62 | 61 73 65 41 64 64 72 29 |),page,b|aseAddr)|
|00001ce0| 3b 0d 09 0d 09 09 44 72 | 61 77 50 72 69 6e 74 66 |;.....Dr|awPrintf|
|00001cf0| 28 22 53 65 74 4d 6f 64 | 65 3a 20 22 29 3b 0d 09 |("SetMod|e: ");..|
|00001d00| 09 65 72 72 6f 72 3d 47 | 44 53 65 74 4d 6f 64 65 |.error=G|DSetMode|
|00001d10| 28 64 65 76 69 63 65 2c | 6d 6f 64 65 2c 70 61 67 |(device,|mode,pag|
|00001d20| 65 2c 26 62 61 73 65 41 | 64 64 72 29 3b 0d 09 09 |e,&baseA|ddr);...|
|00001d30| 69 66 28 65 72 72 6f 72 | 29 20 45 72 72 6f 72 28 |if(error|) Error(|
|00001d40| 65 72 72 6f 72 29 3b 0d | 09 09 65 6c 73 65 20 44 |error);.|..else D|
|00001d50| 72 61 77 50 72 69 6e 74 | 66 28 22 6f 6b 5c 6e 22 |rawPrint|f("ok\n"|
|00001d60| 29 3b 0d 0d 09 09 2f 2a | 20 0d 09 09 09 53 65 74 |);..../*| ....Set|
|00001d70| 4d 6f 64 65 20 61 74 20 | 6f 6e 65 20 74 69 6d 65 |Mode at |one time|
|00001d80| 20 68 61 64 20 74 68 65 | 20 61 6e 6e 6f 79 69 6e | had the| annoyin|
|00001d90| 67 20 73 69 64 65 20 65 | 66 66 65 63 74 20 6f 66 |g side e|ffect of|
|00001da0| 20 0d 09 09 09 73 65 74 | 74 69 6e 67 20 74 68 65 | ....set|ting the|
|00001db0| 20 63 6c 75 74 20 74 6f | 20 75 6e 69 66 6f 72 6d | clut to| uniform|
|00001dc0| 20 67 72 61 79 2c 20 73 | 6f 20 6c 65 74 27 73 20 | gray, s|o let's |
|00001dd0| 72 65 73 74 6f 72 65 20 | 74 68 65 20 63 6c 75 74 |restore |the clut|
|00001de0| 2e 0d 09 09 2a 2f 0d 09 | 09 47 44 52 65 73 74 6f |....*/..|.GDResto|
|00001df0| 72 65 44 65 76 69 63 65 | 43 6c 75 74 28 64 65 76 |reDevice|Clut(dev|
|00001e00| 69 63 65 29 3b 0d 0d 09 | 09 66 6f 72 28 69 3d 6f |ice);...|.for(i=o|
|00001e10| 6e 65 42 69 74 4d 6f 64 | 65 3b 69 3c 3d 74 68 69 |neBitMod|e;i<=thi|
|00001e20| 72 74 79 54 77 6f 42 69 | 74 4d 6f 64 65 3b 69 2b |rtyTwoBi|tMode;i+|
|00001e30| 2b 29 7b 0d 09 09 09 44 | 72 61 77 50 72 69 6e 74 |+){....D|rawPrint|
|00001e40| 66 28 22 47 65 74 50 61 | 67 65 43 6e 74 3a 20 22 |f("GetPa|geCnt: "|
|00001e50| 29 3b 0d 09 09 09 65 72 | 72 6f 72 3d 47 44 47 65 |);....er|ror=GDGe|
|00001e60| 74 50 61 67 65 43 6e 74 | 28 64 65 76 69 63 65 2c |tPageCnt|(device,|
|00001e70| 69 2c 26 70 61 67 65 73 | 29 3b 0d 09 09 09 69 66 |i,&pages|);....if|
|00001e80| 28 65 72 72 6f 72 29 20 | 44 72 61 77 50 72 69 6e |(error) |DrawPrin|
|00001e90| 74 66 28 22 25 73 20 6e | 2f 61 5c 6e 22 2c 47 44 |tf("%s n|/a\n",GD|
|00001ea0| 4d 6f 64 65 4e 61 6d 65 | 28 69 29 29 3b 0d 09 09 |ModeName|(i));...|
|00001eb0| 09 65 6c 73 65 20 44 72 | 61 77 50 72 69 6e 74 66 |.else Dr|awPrintf|
|00001ec0| 28 22 25 73 20 68 61 73 | 20 25 64 20 70 61 67 65 |("%s has| %d page|
|00001ed0| 73 20 61 76 61 69 6c 61 | 62 6c 65 5c 6e 22 2c 47 |s availa|ble\n",G|
|00001ee0| 44 4d 6f 64 65 4e 61 6d | 65 28 69 29 2c 70 61 67 |DModeNam|e(i),pag|
|00001ef0| 65 73 29 3b 0d 09 09 7d | 0d 0d 09 09 44 72 61 77 |es);...}|....Draw|
|00001f00| 50 72 69 6e 74 66 28 22 | 47 65 74 50 61 67 65 42 |Printf("|GetPageB|
|00001f10| 61 73 65 3a 20 22 29 3b | 0d 09 09 70 61 67 65 3d |ase: ");|...page=|
|00001f20| 30 3b 09 2f 2a 20 41 73 | 6b 20 66 6f 72 20 66 69 |0;./* As|k for fi|
|00001f30| 72 73 74 20 70 61 67 65 | 20 2a 2f 0d 09 09 65 72 |rst page| */...er|
|00001f40| 72 6f 72 3d 47 44 47 65 | 74 50 61 67 65 42 61 73 |ror=GDGe|tPageBas|
|00001f50| 65 28 64 65 76 69 63 65 | 2c 70 61 67 65 2c 26 62 |e(device|,page,&b|
|00001f60| 61 73 65 41 64 64 72 29 | 3b 0d 09 09 69 66 28 65 |aseAddr)|;...if(e|
|00001f70| 72 72 6f 72 29 20 45 72 | 72 6f 72 28 65 72 72 6f |rror) Er|ror(erro|
|00001f80| 72 29 3b 0d 09 09 65 6c | 73 65 20 44 72 61 77 50 |r);...el|se DrawP|
|00001f90| 72 69 6e 74 66 28 22 25 | 73 20 70 61 67 65 20 25 |rintf("%|s page %|
|00001fa0| 64 20 62 61 73 65 20 61 | 64 64 72 65 73 73 20 30 |d base a|ddress 0|
|00001fb0| 78 25 6c 58 5c 6e 22 2c | 47 44 4d 6f 64 65 4e 61 |x%lX\n",|GDModeNa|
|00001fc0| 6d 65 28 6d 6f 64 65 29 | 2c 70 61 67 65 2c 62 61 |me(mode)|,page,ba|
|00001fd0| 73 65 41 64 64 72 29 3b | 0d 09 09 69 66 28 70 61 |seAddr);|...if(pa|
|00001fe0| 67 65 73 3e 31 29 7b 0d | 09 09 09 44 72 61 77 50 |ges>1){.|...DrawP|
|00001ff0| 72 69 6e 74 66 28 22 47 | 65 74 50 61 67 65 42 61 |rintf("G|etPageBa|
|00002000| 73 65 3a 20 22 29 3b 0d | 09 09 09 70 61 67 65 3d |se: ");.|...page=|
|00002010| 31 3b 09 2f 2a 20 41 73 | 6b 20 66 6f 72 20 73 65 |1;./* As|k for se|
|00002020| 63 6f 6e 64 20 70 61 67 | 65 20 2a 2f 0d 09 09 09 |cond pag|e */....|
|00002030| 65 72 72 6f 72 3d 47 44 | 47 65 74 50 61 67 65 42 |error=GD|GetPageB|
|00002040| 61 73 65 28 64 65 76 69 | 63 65 2c 70 61 67 65 2c |ase(devi|ce,page,|
|00002050| 26 62 61 73 65 41 64 64 | 72 29 3b 0d 09 09 09 69 |&baseAdd|r);....i|
|00002060| 66 28 65 72 72 6f 72 29 | 20 45 72 72 6f 72 28 65 |f(error)| Error(e|
|00002070| 72 72 6f 72 29 3b 0d 09 | 09 09 65 6c 73 65 20 44 |rror);..|..else D|
|00002080| 72 61 77 50 72 69 6e 74 | 66 28 22 25 73 20 70 61 |rawPrint|f("%s pa|
|00002090| 67 65 20 25 64 20 62 61 | 73 65 20 61 64 64 72 65 |ge %d ba|se addre|
|000020a0| 73 73 20 30 78 25 6c 58 | 5c 6e 22 0d 09 09 09 09 |ss 0x%lX|\n".....|
|000020b0| 2c 47 44 4d 6f 64 65 4e | 61 6d 65 28 6d 6f 64 65 |,GDModeN|ame(mode|
|000020c0| 29 2c 70 61 67 65 2c 62 | 61 73 65 41 64 64 72 29 |),page,b|aseAddr)|
|000020d0| 3b 0d 09 09 7d 0d 09 0d | 09 09 44 72 61 77 50 72 |;...}...|..DrawPr|
|000020e0| 69 6e 74 66 28 22 47 65 | 74 47 72 61 79 3a 20 22 |intf("Ge|tGray: "|
|000020f0| 29 3b 0d 09 09 65 72 72 | 6f 72 3d 47 44 47 65 74 |);...err|or=GDGet|
|00002100| 47 72 61 79 28 64 65 76 | 69 63 65 2c 26 66 6c 61 |Gray(dev|ice,&fla|
|00002110| 67 29 3b 0d 09 09 69 66 | 28 65 72 72 6f 72 29 20 |g);...if|(error) |
|00002120| 45 72 72 6f 72 28 65 72 | 72 6f 72 29 3b 0d 09 09 |Error(er|ror);...|
|00002130| 65 6c 73 65 20 44 72 61 | 77 50 72 69 6e 74 66 28 |else Dra|wPrintf(|
|00002140| 22 66 6c 61 67 20 25 64 | 5c 6e 22 2c 66 6c 61 67 |"flag %d|\n",flag|
|00002150| 29 3b 0d 09 0d 09 09 44 | 72 61 77 50 72 69 6e 74 |);.....D|rawPrint|
|00002160| 66 28 22 53 65 74 47 72 | 61 79 3a 20 22 29 3b 0d |f("SetGr|ay: ");.|
|00002170| 09 09 66 6c 61 67 3d 30 | 3b 0d 09 09 65 72 72 6f |..flag=0|;...erro|
|00002180| 72 3d 47 44 53 65 74 47 | 72 61 79 28 64 65 76 69 |r=GDSetG|ray(devi|
|00002190| 63 65 2c 66 6c 61 67 29 | 3b 0d 09 09 69 66 28 65 |ce,flag)|;...if(e|
|000021a0| 72 72 6f 72 29 20 45 72 | 72 6f 72 28 65 72 72 6f |rror) Er|ror(erro|
|000021b0| 72 29 3b 0d 09 09 65 6c | 73 65 20 44 72 61 77 50 |r);...el|se DrawP|
|000021c0| 72 69 6e 74 66 28 22 6f | 6b 5c 6e 22 29 3b 0d 09 |rintf("o|k\n");..|
|000021d0| 0d 09 09 2f 2a 20 47 65 | 74 49 6e 74 65 72 72 75 |.../* Ge|tInterru|
|000021e0| 70 74 20 63 72 61 73 68 | 65 73 20 74 68 65 20 4e |pt crash|es the N|
|000021f0| 75 56 69 73 74 61 20 64 | 72 69 76 65 72 2e 20 20 |uVista d|river. |
|00002200| 2a 2f 0d 09 09 69 66 28 | 21 45 71 75 61 6c 53 74 |*/...if(|!EqualSt|
|00002210| 72 69 6e 67 28 22 5c 70 | 2e 44 69 73 70 6c 61 79 |ring("\p|.Display|
|00002220| 5f 56 69 64 65 6f 5f 4e | 75 56 69 73 74 61 22 2c |_Video_N|uVista",|
|00002230| 47 44 4e 61 6d 65 28 64 | 65 76 69 63 65 29 2c 30 |GDName(d|evice),0|
|00002240| 2c 30 29 29 7b 0d 09 09 | 09 2f 2a 20 53 65 74 49 |,0)){...|./* SetI|
|00002250| 6e 74 65 72 72 75 70 74 | 20 63 72 61 73 68 65 73 |nterrupt| crashes|
|00002260| 20 74 68 65 20 6f 6c 64 | 20 41 70 70 6c 65 20 64 | the old| Apple d|
|00002270| 72 69 76 65 72 2e 20 20 | 2a 2f 0d 09 09 09 69 66 |river. |*/....if|
|00002280| 28 73 79 73 74 65 6d 56 | 65 72 73 69 6f 6e 3e 3d |(systemV|ersion>=|
|00002290| 30 78 36 30 35 29 7b 0d | 09 09 09 09 44 72 61 77 |0x605){.|....Draw|
|000022a0| 50 72 69 6e 74 66 28 22 | 47 65 74 49 6e 74 65 72 |Printf("|GetInter|
|000022b0| 72 75 70 74 3a 20 22 29 | 3b 0d 09 09 09 09 65 72 |rupt: ")|;.....er|
|000022c0| 72 6f 72 3d 47 44 47 65 | 74 49 6e 74 65 72 72 75 |ror=GDGe|tInterru|
|000022d0| 70 74 28 64 65 76 69 63 | 65 2c 26 66 6c 61 67 29 |pt(devic|e,&flag)|
|000022e0| 3b 0d 09 09 09 09 69 66 | 28 65 72 72 6f 72 29 20 |;.....if|(error) |
|000022f0| 45 72 72 6f 72 28 65 72 | 72 6f 72 29 3b 0d 09 09 |Error(er|ror);...|
|00002300| 09 09 65 6c 73 65 20 44 | 72 61 77 50 72 69 6e 74 |..else D|rawPrint|
|00002310| 66 28 22 25 64 5c 6e 22 | 2c 66 6c 61 67 29 3b 0d |f("%d\n"|,flag);.|
|00002320| 09 09 0d 09 09 09 09 69 | 66 28 30 29 7b 0d 09 09 |.......i|f(0){...|
|00002330| 09 09 09 2f 2f 20 63 72 | 61 73 68 65 73 20 62 75 |...// cr|ashes bu|
|00002340| 69 6c 74 2d 69 6e 20 76 | 69 64 65 6f 20 6f 6e 20 |ilt-in v|ideo on |
|00002350| 50 6f 77 65 72 42 6f 6f | 6b 20 31 36 30 0d 09 09 |PowerBoo|k 160...|
|00002360| 09 09 09 44 72 61 77 50 | 72 69 6e 74 66 28 22 53 |...DrawP|rintf("S|
|00002370| 65 74 49 6e 74 65 72 72 | 75 70 74 3a 20 22 29 3b |etInterr|upt: ");|
|00002380| 0d 09 09 09 09 09 65 72 | 72 6f 72 3d 47 44 53 65 |......er|ror=GDSe|
|00002390| 74 49 6e 74 65 72 72 75 | 70 74 28 64 65 76 69 63 |tInterru|pt(devic|
|000023a0| 65 2c 66 6c 61 67 29 3b | 0d 09 09 09 09 09 69 66 |e,flag);|......if|
|000023b0| 28 65 72 72 6f 72 29 20 | 45 72 72 6f 72 28 65 72 |(error) |Error(er|
|000023c0| 72 6f 72 29 3b 0d 09 09 | 09 09 09 65 6c 73 65 20 |ror);...|...else |
|000023d0| 44 72 61 77 50 72 69 6e | 74 66 28 22 6f 6b 5c 6e |DrawPrin|tf("ok\n|
|000023e0| 22 29 3b 0d 09 09 09 09 | 7d 0d 09 09 09 7d 0d 09 |");.....|}....}..|
|000023f0| 09 09 65 6c 73 65 20 44 | 72 61 77 50 72 69 6e 74 |..else D|rawPrint|
|00002400| 66 28 22 a5 a5 a5 a5 a5 | 53 6b 69 70 70 69 6e 67 |f(".....|Skipping|
|00002410| 20 47 65 74 49 6e 74 65 | 72 72 75 70 74 20 26 20 | GetInte|rrupt & |
|00002420| 53 65 74 49 6e 74 65 72 | 72 75 70 74 2e 5c 6e 22 |SetInter|rupt.\n"|
|00002430| 29 3b 0d 09 09 7d 0d 09 | 09 65 6c 73 65 20 44 72 |);...}..|.else Dr|
|00002440| 61 77 50 72 69 6e 74 66 | 28 22 a5 a5 a5 a5 a5 53 |awPrintf|(".....S|
|00002450| 6b 69 70 70 69 6e 67 20 | 47 65 74 49 6e 74 65 72 |kipping |GetInter|
|00002460| 72 75 70 74 20 26 20 53 | 65 74 49 6e 74 65 72 72 |rupt & S|etInterr|
|00002470| 75 70 74 20 74 6f 20 61 | 76 6f 69 64 20 6b 6e 6f |upt to a|void kno|
|00002480| 77 6e 20 62 75 67 20 69 | 6e 20 25 73 2e 5c 6e 22 |wn bug i|n %s.\n"|
|00002490| 2c 47 44 43 61 72 64 4e | 61 6d 65 28 64 65 76 69 |,GDCardN|ame(devi|
|000024a0| 63 65 29 29 3b 0d 0d 09 | 09 44 72 61 77 50 72 69 |ce));...|.DrawPri|
|000024b0| 6e 74 66 28 22 47 65 74 | 47 61 6d 6d 61 3a 20 22 |ntf("Get|Gamma: "|
|000024c0| 29 3b 0d 09 09 65 72 72 | 6f 72 3d 47 44 47 65 74 |);...err|or=GDGet|
|000024d0| 47 61 6d 6d 61 28 64 65 | 76 69 63 65 2c 26 67 61 |Gamma(de|vice,&ga|
|000024e0| 6d 6d 61 29 3b 0d 09 09 | 69 66 28 65 72 72 6f 72 |mma);...|if(error|
|000024f0| 29 20 45 72 72 6f 72 28 | 65 72 72 6f 72 29 3b 0d |) Error(|error);.|
|00002500| 09 09 65 6c 73 65 20 44 | 72 61 77 50 72 69 6e 74 |..else D|rawPrint|
|00002510| 66 28 22 67 61 6d 6d 61 | 20 74 61 62 6c 65 20 69 |f("gamma| table i|
|00002520| 6e 64 69 63 61 74 65 73 | 20 74 68 61 74 20 74 68 |ndicates| that th|
|00002530| 65 20 76 69 64 65 6f 20 | 63 61 72 64 20 68 61 73 |e video |card has|
|00002540| 20 25 64 2d 62 69 74 20 | 64 61 63 73 2c 20 22 0d | %d-bit |dacs, ".|
|00002550| 09 09 09 22 61 6e 64 20 | 25 64 20 65 6e 74 72 69 |..."and |%d entri|
|00002560| 65 73 20 69 6e 20 69 74 | 73 20 63 6c 75 74 2e 5c |es in it|s clut.\|
|00002570| 6e 22 0d 09 09 09 2c 67 | 61 6d 6d 61 2d 3e 67 44 |n"....,g|amma->gD|
|00002580| 61 74 61 57 69 64 74 68 | 2c 67 61 6d 6d 61 2d 3e |ataWidth|,gamma->|
|00002590| 67 44 61 74 61 43 6e 74 | 29 3b 0d 09 09 69 66 28 |gDataCnt|);...if(|
|000025a0| 21 65 72 72 6f 72 29 7b | 0d 09 09 09 44 72 61 77 |!error){|....Draw|
|000025b0| 50 72 69 6e 74 66 28 22 | 67 56 65 72 73 69 6f 6e |Printf("|gVersion|
|000025c0| 20 25 64 2c 20 67 54 79 | 70 65 20 25 64 2c 20 67 | %d, gTy|pe %d, g|
|000025d0| 46 6f 72 6d 75 6c 61 53 | 69 7a 65 20 25 64 2c 20 |FormulaS|ize %d, |
|000025e0| 67 43 68 61 6e 43 6e 74 | 20 25 64 5c 6e 22 0d 09 |gChanCnt| %d\n"..|
|000025f0| 09 09 2c 67 61 6d 6d 61 | 2d 3e 67 56 65 72 73 69 |..,gamma|->gVersi|
|00002600| 6f 6e 2c 67 61 6d 6d 61 | 2d 3e 67 54 79 70 65 2c |on,gamma|->gType,|
|00002610| 67 61 6d 6d 61 2d 3e 67 | 46 6f 72 6d 75 6c 61 53 |gamma->g|FormulaS|
|00002620| 69 7a 65 2c 67 61 6d 6d | 61 2d 3e 67 43 68 61 6e |ize,gamm|a->gChan|
|00002630| 43 6e 74 29 3b 0d 09 09 | 7d 0d 09 09 69 66 28 21 |Cnt);...|}...if(!|
|00002640| 65 72 72 6f 72 20 26 26 | 20 47 41 4d 4d 41 5f 54 |error &&| GAMMA_T|
|00002650| 41 42 4c 45 20 2f 2f 20 | 70 72 69 6e 74 6f 75 74 |ABLE // |printout|
|00002660| 20 6f 66 20 67 61 6d 6d | 61 20 74 61 62 6c 65 20 | of gamm|a table |
|00002670| 69 73 20 6f 70 74 69 6f | 6e 61 6c 0d 09 09 09 09 |is optio|nal.....|
|00002680| 26 26 20 67 61 6d 6d 61 | 2d 3e 67 56 65 72 73 69 |&& gamma|->gVersi|
|00002690| 6f 6e 3d 3d 30 20 26 26 | 20 67 61 6d 6d 61 2d 3e |on==0 &&| gamma->|
|000026a0| 67 54 79 70 65 3d 3d 30 | 29 7b 0d 09 09 09 47 65 |gType==0|){....Ge|
|000026b0| 74 46 4e 75 6d 28 22 5c | 70 4d 6f 6e 61 63 6f 22 |tFNum("\|pMonaco"|
|000026c0| 2c 26 6e 65 77 46 6f 6e | 74 4e 75 6d 62 65 72 29 |,&newFon|tNumber)|
|000026d0| 3b 0d 09 09 09 54 65 78 | 74 46 6f 6e 74 28 6e 65 |;....Tex|tFont(ne|
|000026e0| 77 46 6f 6e 74 4e 75 6d | 62 65 72 29 3b 0d 09 09 |wFontNum|ber);...|
|000026f0| 09 54 65 78 74 53 69 7a | 65 28 39 29 3b 0d 09 09 |.TextSiz|e(9);...|
|00002700| 09 62 79 74 65 3d 28 75 | 6e 73 69 67 6e 65 64 20 |.byte=(u|nsigned |
|00002710| 63 68 61 72 20 2a 29 67 | 61 6d 6d 61 2d 3e 67 46 |char *)g|amma->gF|
|00002720| 6f 72 6d 75 6c 61 44 61 | 74 61 2b 67 61 6d 6d 61 |ormulaDa|ta+gamma|
|00002730| 2d 3e 67 46 6f 72 6d 75 | 6c 61 53 69 7a 65 3b 0d |->gFormu|laSize;.|
|00002740| 09 09 09 77 6f 72 64 3d | 28 75 6e 73 69 67 6e 65 |...word=|(unsigne|
|00002750| 64 20 73 68 6f 72 74 20 | 2a 29 62 79 74 65 3b 0d |d short |*)byte;.|
|00002760| 09 09 09 44 72 61 77 50 | 72 69 6e 74 66 28 22 47 |...DrawP|rintf("G|
|00002770| 61 6d 6d 61 20 54 61 62 | 6c 65 3a 5c 6e 22 29 3b |amma Tab|le:\n");|
|00002780| 0d 09 09 09 66 6f 72 28 | 69 3d 30 3b 69 3c 67 61 |....for(|i=0;i<ga|
|00002790| 6d 6d 61 2d 3e 67 44 61 | 74 61 43 6e 74 3b 69 2b |mma->gDa|taCnt;i+|
|000027a0| 3d 36 34 29 20 7b 0d 09 | 09 09 09 44 72 61 77 50 |=64) {..|...DrawP|
|000027b0| 72 69 6e 74 66 28 22 25 | 33 64 3a 20 22 2c 69 29 |rintf("%|3d: ",i)|
|000027c0| 3b 0d 09 09 09 09 69 66 | 28 67 61 6d 6d 61 2d 3e |;.....if|(gamma->|
|000027d0| 67 44 61 74 61 57 69 64 | 74 68 3c 3d 38 29 0d 09 |gDataWid|th<=8)..|
|000027e0| 09 09 09 09 66 6f 72 28 | 6a 3d 30 3b 6a 3c 36 34 |....for(|j=0;j<64|
|000027f0| 3b 6a 2b 2b 29 20 44 72 | 61 77 50 72 69 6e 74 66 |;j++) Dr|awPrintf|
|00002800| 28 22 20 25 33 75 22 2c | 62 79 74 65 5b 69 2b 6a |(" %3u",|byte[i+j|
|00002810| 5d 29 3b 0d 09 09 09 09 | 65 6c 73 65 0d 09 09 09 |]);.....|else....|
|00002820| 09 09 66 6f 72 28 6a 3d | 30 3b 6a 3c 36 34 3b 6a |..for(j=|0;j<64;j|
|00002830| 2b 2b 29 20 44 72 61 77 | 50 72 69 6e 74 66 28 22 |++) Draw|Printf("|
|00002840| 20 25 33 75 22 2c 77 6f | 72 64 5b 69 2b 6a 5d 29 | %3u",wo|rd[i+j])|
|00002850| 3b 0d 09 09 09 09 44 72 | 61 77 50 72 69 6e 74 66 |;.....Dr|awPrintf|
|00002860| 28 22 5c 6e 22 29 3b 0d | 09 09 09 7d 0d 09 09 09 |("\n");.|...}....|
|00002870| 54 65 78 74 46 6f 6e 74 | 28 66 6f 6e 74 4e 75 6d |TextFont|(fontNum|
|00002880| 62 65 72 29 3b 0d 09 09 | 09 54 65 78 74 53 69 7a |ber);...|.TextSiz|
|00002890| 65 28 74 65 78 74 53 69 | 7a 65 29 3b 0d 09 09 7d |e(textSi|ze);...}|
|000028a0| 0d 09 09 69 66 28 21 65 | 72 72 6f 72 29 67 61 6d |...if(!e|rror)gam|
|000028b0| 6d 61 44 61 74 61 57 69 | 64 74 68 3d 67 61 6d 6d |maDataWi|dth=gamm|
|000028c0| 61 2d 3e 67 44 61 74 61 | 57 69 64 74 68 3b 0d 09 |a->gData|Width;..|
|000028d0| 09 65 6c 73 65 20 67 61 | 6d 6d 61 44 61 74 61 57 |.else ga|mmaDataW|
|000028e0| 69 64 74 68 3d 30 3b 0d | 09 09 0d 09 09 44 72 61 |idth=0;.|.....Dra|
|000028f0| 77 50 72 69 6e 74 66 28 | 22 53 65 74 47 61 6d 6d |wPrintf(|"SetGamm|
|00002900| 61 3a 20 22 29 3b 0d 09 | 09 69 66 28 67 61 6d 6d |a: ");..|.if(gamm|
|00002910| 61 3d 3d 4e 55 4c 4c 29 | 7b 0d 09 09 09 2f 2f 20 |a==NULL)|{....// |
|00002920| 47 65 74 20 74 68 65 20 | 64 61 63 27 73 20 73 69 |Get the |dac's si|
|00002930| 7a 65 20 66 72 6f 6d 20 | 74 68 65 20 63 75 72 72 |ze from |the curr|
|00002940| 65 6e 74 20 67 61 6d 6d | 61 20 74 61 62 6c 65 2e |ent gamm|a table.|
|00002950| 0d 09 09 09 69 66 28 67 | 61 6d 6d 61 21 3d 4e 55 |....if(g|amma!=NU|
|00002960| 4c 4c 29 7b 0d 09 09 09 | 09 64 61 63 53 69 7a 65 |LL){....|.dacSize|
|00002970| 3d 67 61 6d 6d 61 2d 3e | 67 44 61 74 61 57 69 64 |=gamma->|gDataWid|
|00002980| 74 68 3b 0d 09 09 09 09 | 64 61 74 61 43 6e 74 3d |th;.....|dataCnt=|
|00002990| 67 61 6d 6d 61 2d 3e 67 | 44 61 74 61 43 6e 74 3b |gamma->g|DataCnt;|
|000029a0| 0d 09 09 09 7d 0d 09 09 | 09 65 6c 73 65 7b 20 2f |....}...|.else{ /|
|000029b0| 2f 20 54 68 65 20 64 72 | 69 76 65 72 20 77 6f 6e |/ The dr|iver won|
|000029c0| 27 74 20 74 65 6c 6c 20 | 75 73 2c 20 73 6f 20 61 |'t tell |us, so a|
|000029d0| 73 73 75 6d 65 20 38 2d | 62 69 74 20 64 61 63 73 |ssume 8-|bit dacs|
|000029e0| 2e 0d 09 09 09 09 64 61 | 63 53 69 7a 65 3d 38 3b |......da|cSize=8;|
|000029f0| 0d 09 09 09 09 64 61 74 | 61 43 6e 74 3d 31 4c 3c |.....dat|aCnt=1L<|
|00002a00| 3c 64 61 63 53 69 7a 65 | 3b 0d 09 09 09 7d 0d 09 |<dacSize|;....}..|
|00002a10| 09 09 69 66 28 64 61 63 | 53 69 7a 65 3c 3d 38 29 |..if(dac|Size<=8)|
|00002a20| 64 61 74 61 53 69 7a 65 | 3d 31 3b 0d 09 09 09 65 |dataSize|=1;....e|
|00002a30| 6c 73 65 20 64 61 74 61 | 53 69 7a 65 3d 32 3b 0d |lse data|Size=2;.|
|00002a40| 09 09 09 6d 79 47 61 6d | 6d 61 3d 28 47 61 6d 6d |...myGam|ma=(Gamm|
|00002a50| 61 54 62 6c 20 2a 29 4e | 65 77 50 74 72 28 73 69 |aTbl *)N|ewPtr(si|
|00002a60| 7a 65 6f 66 28 47 61 6d | 6d 61 54 62 6c 29 2b 64 |zeof(Gam|maTbl)+d|
|00002a70| 61 74 61 43 6e 74 2a 64 | 61 74 61 53 69 7a 65 29 |ataCnt*d|ataSize)|
|00002a80| 3b 0d 09 09 09 61 73 73 | 65 72 74 28 6d 79 47 61 |;....ass|ert(myGa|
|00002a90| 6d 6d 61 21 3d 4e 55 4c | 4c 29 3b 0d 09 09 09 6d |mma!=NUL|L);....m|
|00002aa0| 79 47 61 6d 6d 61 2d 3e | 67 56 65 72 73 69 6f 6e |yGamma->|gVersion|
|00002ab0| 3d 30 3b 0d 09 09 09 6d | 79 47 61 6d 6d 61 2d 3e |=0;....m|yGamma->|
|00002ac0| 67 54 79 70 65 3d 30 3b | 0d 09 09 09 6d 79 47 61 |gType=0;|....myGa|
|00002ad0| 6d 6d 61 2d 3e 67 46 6f | 72 6d 75 6c 61 53 69 7a |mma->gFo|rmulaSiz|
|00002ae0| 65 3d 30 3b 0d 09 09 09 | 6d 79 47 61 6d 6d 61 2d |e=0;....|myGamma-|
|00002af0| 3e 67 43 68 61 6e 43 6e | 74 3d 31 3b 0d 09 09 09 |>gChanCn|t=1;....|
|00002b00| 6d 79 47 61 6d 6d 61 2d | 3e 67 44 61 74 61 43 6e |myGamma-|>gDataCn|
|00002b10| 74 3d 64 61 74 61 43 6e | 74 3b 0d 09 09 09 6d 79 |t=dataCn|t;....my|
|00002b20| 47 61 6d 6d 61 2d 3e 67 | 44 61 74 61 57 69 64 74 |Gamma->g|DataWidt|
|00002b30| 68 3d 64 61 63 53 69 7a | 65 3b 0d 09 09 09 62 79 |h=dacSiz|e;....by|
|00002b40| 74 65 3d 28 75 6e 73 69 | 67 6e 65 64 20 63 68 61 |te=(unsi|gned cha|
|00002b50| 72 20 2a 29 6d 79 47 61 | 6d 6d 61 2d 3e 67 46 6f |r *)myGa|mma->gFo|
|00002b60| 72 6d 75 6c 61 44 61 74 | 61 2b 6d 79 47 61 6d 6d |rmulaDat|a+myGamm|
|00002b70| 61 2d 3e 67 46 6f 72 6d | 75 6c 61 53 69 7a 65 3b |a->gForm|ulaSize;|
|00002b80| 0d 09 09 09 77 6f 72 64 | 3d 28 75 6e 73 69 67 6e |....word|=(unsign|
|00002b90| 65 64 20 73 68 6f 72 74 | 20 2a 29 62 79 74 65 3b |ed short| *)byte;|
|00002ba0| 0d 09 09 09 69 66 28 6d | 79 47 61 6d 6d 61 2d 3e |....if(m|yGamma->|
|00002bb0| 67 44 61 74 61 57 69 64 | 74 68 3c 3d 38 29 0d 09 |gDataWid|th<=8)..|
|00002bc0| 09 09 09 66 6f 72 28 69 | 3d 30 3b 69 3c 6d 79 47 |...for(i|=0;i<myG|
|00002bd0| 61 6d 6d 61 2d 3e 67 44 | 61 74 61 43 6e 74 3b 69 |amma->gD|ataCnt;i|
|00002be0| 2b 2b 29 20 62 79 74 65 | 5b 69 5d 3d 69 3b 0d 09 |++) byte|[i]=i;..|
|00002bf0| 09 09 65 6c 73 65 0d 09 | 09 09 09 66 6f 72 28 69 |..else..|...for(i|
|00002c00| 3d 30 3b 69 3c 6d 79 47 | 61 6d 6d 61 2d 3e 67 44 |=0;i<myG|amma->gD|
|00002c10| 61 74 61 43 6e 74 3b 69 | 2b 2b 29 20 77 6f 72 64 |ataCnt;i|++) word|
|00002c20| 5b 69 5d 3d 69 3b 0d 09 | 09 09 67 61 6d 6d 61 3d |[i]=i;..|..gamma=|
|00002c30| 6d 79 47 61 6d 6d 61 3b | 0d 09 09 7d 65 6c 73 65 |myGamma;|...}else|
|00002c40| 20 6d 79 47 61 6d 6d 61 | 3d 4e 55 4c 4c 3b 0d 09 | myGamma|=NULL;..|
|00002c50| 09 65 72 72 6f 72 3d 47 | 44 53 65 74 47 61 6d 6d |.error=G|DSetGamm|
|00002c60| 61 28 64 65 76 69 63 65 | 2c 67 61 6d 6d 61 29 3b |a(device|,gamma);|
|00002c70| 0d 09 09 69 66 28 65 72 | 72 6f 72 29 20 45 72 72 |...if(er|ror) Err|
|00002c80| 6f 72 28 65 72 72 6f 72 | 29 3b 0d 09 09 65 6c 73 |or(error|);...els|
|00002c90| 65 20 44 72 61 77 50 72 | 69 6e 74 66 28 22 6f 6b |e DrawPr|intf("ok|
|00002ca0| 2e 5c 6e 22 29 3b 0d 09 | 09 69 66 28 6d 79 47 61 |.\n");..|.if(myGa|
|00002cb0| 6d 6d 61 21 3d 4e 55 4c | 4c 29 7b 0d 09 09 09 44 |mma!=NUL|L){....D|
|00002cc0| 69 73 70 6f 73 50 74 72 | 28 28 50 74 72 29 6d 79 |isposPtr|((Ptr)my|
|00002cd0| 47 61 6d 6d 61 29 3b 0d | 09 09 09 6d 79 47 61 6d |Gamma);.|...myGam|
|00002ce0| 6d 61 3d 4e 55 4c 4c 3b | 0d 09 09 7d 0d 09 0d 09 |ma=NULL;|...}....|
|00002cf0| 09 2f 2f 20 47 65 74 45 | 6e 74 72 69 65 73 0d 09 |.// GetE|ntries..|
|00002d00| 09 73 74 61 72 74 3d 30 | 3b 0d 09 09 63 6f 75 6e |.start=0|;...coun|
|00002d10| 74 3d 47 44 43 6c 75 74 | 53 69 7a 65 28 64 65 76 |t=GDClut|Size(dev|
|00002d20| 69 63 65 29 2d 31 3b 0d | 09 09 69 66 28 63 6f 75 |ice)-1;.|..if(cou|
|00002d30| 6e 74 3e 73 69 7a 65 6f | 66 28 6d 79 54 61 62 6c |nt>sizeo|f(myTabl|
|00002d40| 65 29 2f 73 69 7a 65 6f | 66 28 6d 79 54 61 62 6c |e)/sizeo|f(myTabl|
|00002d50| 65 5b 30 5d 29 2d 31 29 | 0d 09 09 09 63 6f 75 6e |e[0])-1)|....coun|
|00002d60| 74 3d 73 69 7a 65 6f 66 | 28 6d 79 54 61 62 6c 65 |t=sizeof|(myTable|
|00002d70| 29 2f 73 69 7a 65 6f 66 | 28 6d 79 54 61 62 6c 65 |)/sizeof|(myTable|
|00002d80| 5b 30 5d 29 2d 31 3b 0d | 09 09 44 72 61 77 50 72 |[0])-1;.|..DrawPr|
|00002d90| 69 6e 74 66 28 22 47 65 | 74 45 6e 74 72 69 65 73 |intf("Ge|tEntries|
|00002da0| 3a 20 22 29 3b 0d 09 09 | 65 72 72 6f 72 3d 47 44 |: ");...|error=GD|
|00002db0| 47 65 74 45 6e 74 72 69 | 65 73 28 64 65 76 69 63 |GetEntri|es(devic|
|00002dc0| 65 2c 73 74 61 72 74 2c | 63 6f 75 6e 74 2c 6d 79 |e,start,|count,my|
|00002dd0| 54 61 62 6c 65 29 3b 0d | 09 09 69 66 28 65 72 72 |Table);.|..if(err|
|00002de0| 6f 72 29 45 72 72 6f 72 | 28 65 72 72 6f 72 29 3b |or)Error|(error);|
|00002df0| 0d 09 09 65 6c 73 65 20 | 44 72 61 77 50 72 69 6e |...else |DrawPrin|
|00002e00| 74 66 28 22 6f 6b 5c 6e | 22 29 3b 0d 09 09 0d 09 |tf("ok\n|");.....|
|00002e10| 09 2f 2f 20 53 65 74 45 | 6e 74 72 69 65 73 0d 09 |.// SetE|ntries..|
|00002e20| 09 63 6f 75 6e 74 3d 47 | 44 43 6c 75 74 53 69 7a |.count=G|DClutSiz|
|00002e30| 65 28 64 65 76 69 63 65 | 29 2d 31 3b 0d 09 09 73 |e(device|)-1;...s|
|00002e40| 77 69 74 63 68 28 28 2a | 64 65 76 69 63 65 29 2d |witch((*|device)-|
|00002e50| 3e 67 64 54 79 70 65 29 | 7b 0d 09 09 09 63 61 73 |>gdType)|{....cas|
|00002e60| 65 20 63 6c 75 74 54 79 | 70 65 3a 0d 09 09 09 09 |e clutTy|pe:.....|
|00002e70| 44 72 61 77 50 72 69 6e | 74 66 28 22 53 65 74 45 |DrawPrin|tf("SetE|
|00002e80| 6e 74 72 69 65 73 3a 20 | 22 29 3b 0d 09 09 09 09 |ntries: |");.....|
|00002e90| 65 72 72 6f 72 3d 47 44 | 53 65 74 45 6e 74 72 69 |error=GD|SetEntri|
|00002ea0| 65 73 28 64 65 76 69 63 | 65 2c 30 2c 63 6f 75 6e |es(devic|e,0,coun|
|00002eb0| 74 2c 28 28 2a 2a 28 2a | 2a 28 2a 2a 64 65 76 69 |t,((**(*|*(**devi|
|00002ec0| 63 65 29 2e 67 64 50 4d | 61 70 29 2e 70 6d 54 61 |ce).gdPM|ap).pmTa|
|00002ed0| 62 6c 65 29 29 2e 63 74 | 54 61 62 6c 65 29 3b 0d |ble)).ct|Table);.|
|00002ee0| 09 09 09 09 69 66 28 65 | 72 72 6f 72 29 45 72 72 |....if(e|rror)Err|
|00002ef0| 6f 72 28 65 72 72 6f 72 | 29 3b 0d 09 09 09 09 65 |or(error|);.....e|
|00002f00| 6c 73 65 20 44 72 61 77 | 50 72 69 6e 74 66 28 22 |lse Draw|Printf("|
|00002f10| 6f 6b 5c 6e 22 29 3b 0d | 09 09 09 09 62 72 65 61 |ok\n");.|....brea|
|00002f20| 6b 3b 0d 09 09 09 63 61 | 73 65 20 64 69 72 65 63 |k;....ca|se direc|
|00002f30| 74 54 79 70 65 3a 0d 09 | 09 09 09 44 72 61 77 50 |tType:..|...DrawP|
|00002f40| 72 69 6e 74 66 28 22 44 | 69 72 65 63 74 53 65 74 |rintf("D|irectSet|
|00002f50| 45 6e 74 72 69 65 73 3a | 20 22 29 3b 0d 09 09 09 |Entries:| ");....|
|00002f60| 09 65 72 72 6f 72 3d 47 | 44 44 69 72 65 63 74 53 |.error=G|DDirectS|
|00002f70| 65 74 45 6e 74 72 69 65 | 73 28 64 65 76 69 63 65 |etEntrie|s(device|
|00002f80| 2c 30 2c 30 2c 26 62 6c | 61 63 6b 29 3b 0d 09 09 |,0,0,&bl|ack);...|
|00002f90| 09 09 69 66 28 65 72 72 | 6f 72 29 45 72 72 6f 72 |..if(err|or)Error|
|00002fa0| 28 65 72 72 6f 72 29 3b | 0d 09 09 09 09 65 6c 73 |(error);|.....els|
|00002fb0| 65 20 44 72 61 77 50 72 | 69 6e 74 66 28 22 6f 6b |e DrawPr|intf("ok|
|00002fc0| 5c 6e 22 29 3b 0d 09 09 | 09 09 62 72 65 61 6b 3b |\n");...|..break;|
|00002fd0| 0d 09 09 09 63 61 73 65 | 20 66 69 78 65 64 54 79 |....case| fixedTy|
|00002fe0| 70 65 3a 0d 09 09 09 09 | 44 72 61 77 50 72 69 6e |pe:.....|DrawPrin|
|00002ff0| 74 66 28 22 54 68 65 20 | 63 6c 75 74 20 63 61 6e |tf("The |clut can|
|00003000| 6e 6f 74 20 62 65 20 6d | 6f 64 69 66 69 65 64 2e |not be m|odified.|
|00003010| 5c 6e 22 29 3b 0d 09 09 | 09 09 62 72 65 61 6b 3b |\n");...|..break;|
|00003020| 0d 09 09 7d 0d 09 09 0d | 09 09 2f 2f 20 4d 69 73 |...}....|..// Mis|
|00003030| 63 65 6c 6c 61 6e 65 6f | 75 73 0d 09 09 63 6c 75 |cellaneo|us...clu|
|00003040| 74 53 69 7a 65 3d 47 44 | 43 6c 75 74 53 69 7a 65 |tSize=GD|ClutSize|
|00003050| 28 64 65 76 69 63 65 29 | 3b 0d 09 09 70 69 78 65 |(device)|;...pixe|
|00003060| 6c 53 69 7a 65 3d 31 3c | 3c 28 6d 6f 64 65 26 37 |lSize=1<|<(mode&7|
|00003070| 29 3b 0d 09 09 74 79 70 | 65 3d 28 2a 64 65 76 69 |);...typ|e=(*devi|
|00003080| 63 65 29 2d 3e 67 64 54 | 79 70 65 3b 0d 09 09 44 |ce)->gdT|ype;...D|
|00003090| 72 61 77 50 72 69 6e 74 | 66 28 22 43 75 72 72 65 |rawPrint|f("Curre|
|000030a0| 6e 74 6c 79 20 69 6e 20 | 25 73 2c 20 70 69 78 65 |ntly in |%s, pixe|
|000030b0| 6c 53 69 7a 65 20 25 64 | 20 62 69 74 73 2c 20 63 |lSize %d| bits, c|
|000030c0| 6c 75 74 53 69 7a 65 20 | 25 64 20 65 6e 74 72 69 |lutSize |%d entri|
|000030d0| 65 73 2c 20 25 73 22 0d | 09 09 09 2c 6d 6f 64 65 |es, %s".|...,mode|
|000030e0| 4e 61 6d 65 5b 6d 6f 64 | 65 26 37 5d 2c 70 69 78 |Name[mod|e&7],pix|
|000030f0| 65 6c 53 69 7a 65 2c 63 | 6c 75 74 53 69 7a 65 2c |elSize,c|lutSize,|
|00003100| 74 79 70 65 4e 61 6d 65 | 5b 74 79 70 65 5d 29 3b |typeName|[type]);|
|00003110| 0d 09 09 69 66 28 67 61 | 6d 6d 61 44 61 74 61 57 |...if(ga|mmaDataW|
|00003120| 69 64 74 68 21 3d 30 29 | 44 72 61 77 50 72 69 6e |idth!=0)|DrawPrin|
|00003130| 74 66 28 22 2c 20 64 61 | 63 53 69 7a 65 20 25 64 |tf(", da|cSize %d|
|00003140| 20 62 69 74 73 22 2c 67 | 61 6d 6d 61 44 61 74 61 | bits",g|ammaData|
|00003150| 57 69 64 74 68 29 3b 0d | 09 09 44 72 61 77 50 72 |Width);.|..DrawPr|
|00003160| 69 6e 74 66 28 22 2e 5c | 6e 22 29 3b 0d 0d 09 09 |intf(".\|n");....|
|00003170| 54 65 78 74 46 61 63 65 | 28 62 6f 6c 64 29 3b 0d |TextFace|(bold);.|
|00003180| 09 09 66 3d 47 44 46 72 | 61 6d 65 52 61 74 65 28 |..f=GDFr|ameRate(|
|00003190| 64 65 76 69 63 65 29 3b | 0d 09 09 44 72 61 77 50 |device);|...DrawP|
|000031a0| 72 69 6e 74 66 28 22 25 | 2e 31 66 20 48 7a 20 66 |rintf("%|.1f Hz f|
|000031b0| 72 61 6d 65 20 72 61 74 | 65 20 28 25 2e 31 66 20 |rame rat|e (%.1f |
|000031c0| 6d 73 29 2e 5c 6e 22 2c | 66 2c 31 30 30 30 2e 30 |ms).\n",|f,1000.0|
|000031d0| 2f 66 29 3b 0d 09 09 69 | 66 28 28 2a 64 65 76 69 |/f);...i|f((*devi|
|000031e0| 63 65 29 2d 3e 67 64 54 | 79 70 65 21 3d 66 69 78 |ce)->gdT|ype!=fix|
|000031f0| 65 64 54 79 70 65 29 7b | 0d 09 09 09 69 66 28 6d |edType){|....if(m|
|00003200| 6f 64 65 3c 73 69 78 74 | 65 65 6e 42 69 74 4d 6f |ode<sixt|eenBitMo|
|00003210| 64 65 29 6e 61 6d 65 3d | 22 53 65 74 45 6e 74 72 |de)name=|"SetEntr|
|00003220| 69 65 73 22 3b 0d 09 09 | 09 65 6c 73 65 20 6e 61 |ies";...|.else na|
|00003230| 6d 65 3d 22 44 69 72 65 | 63 74 53 65 74 45 6e 74 |me="Dire|ctSetEnt|
|00003240| 72 69 65 73 22 3b 0d 09 | 09 09 44 72 61 77 50 72 |ries";..|..DrawPr|
|00003250| 69 6e 74 66 28 22 52 65 | 70 65 61 74 65 64 6c 79 |intf("Re|peatedly|
|00003260| 20 6c 6f 61 64 69 6e 67 | 20 74 68 65 20 63 6c 75 | loading| the clu|
|00003270| 74 2c 20 62 79 20 63 61 | 6c 6c 69 6e 67 20 25 73 |t, by ca|lling %s|
|00003280| 28 29 2c 20 22 0d 09 09 | 09 09 22 74 61 6b 65 73 |(), "...|.."takes|
|00003290| 20 25 2e 32 66 20 66 72 | 61 6d 65 20 65 61 63 68 | %.2f fr|ame each|
|000032a0| 20 74 69 6d 65 2e 5c 6e | 22 0d 09 09 09 09 2c 6e | time.\n|".....,n|
|000032b0| 61 6d 65 2c 47 44 46 72 | 61 6d 65 73 50 65 72 43 |ame,GDFr|amesPerC|
|000032c0| 6c 75 74 55 70 64 61 74 | 65 28 64 65 76 69 63 65 |lutUpdat|e(device|
|000032d0| 2c 30 29 29 3b 0d 09 09 | 09 66 3d 47 44 43 6c 75 |,0));...|.f=GDClu|
|000032e0| 74 55 70 64 61 74 65 52 | 61 74 65 28 64 65 76 69 |tUpdateR|ate(devi|
|000032f0| 63 65 2c 30 29 3b 0d 09 | 09 09 44 72 61 77 50 72 |ce,0);..|..DrawPr|
|00003300| 69 6e 74 66 28 22 25 2e | 31 66 20 48 7a 20 63 6c |intf("%.|1f Hz cl|
|00003310| 75 74 20 75 70 64 61 74 | 65 20 72 61 74 65 20 28 |ut updat|e rate (|
|00003320| 25 2e 31 66 20 6d 73 29 | 2e 5c 6e 22 2c 66 2c 31 |%.1f ms)|.\n",f,1|
|00003330| 30 30 30 2e 30 2f 66 29 | 3b 0d 09 09 7d 0d 09 09 |000.0/f)|;...}...|
|00003340| 54 65 78 74 46 61 63 65 | 28 30 29 3b 0d 09 09 0d |TextFace|(0);....|
|00003350| 09 09 69 66 28 30 29 7b | 0d 09 09 09 2f 2a 20 49 |..if(0){|..../* I|
|00003360| 20 68 61 76 65 6e 27 74 | 20 66 6f 75 6e 64 20 61 | haven't| found a|
|00003370| 6e 79 20 75 73 65 20 66 | 6f 72 20 74 68 65 73 65 |ny use f|or these|
|00003380| 20 63 61 6c 6c 73 2c 20 | 73 6f 20 73 6b 69 70 20 | calls, |so skip |
|00003390| 27 65 6d 20 2a 2f 0d 09 | 09 09 44 72 61 77 50 72 |'em */..|..DrawPr|
|000033a0| 69 6e 74 66 28 22 47 65 | 74 44 65 66 61 75 6c 74 |intf("Ge|tDefault|
|000033b0| 4d 6f 64 65 3a 20 22 29 | 3b 0d 09 09 09 65 72 72 |Mode: ")|;....err|
|000033c0| 6f 72 3d 47 44 47 65 74 | 44 65 66 61 75 6c 74 4d |or=GDGet|DefaultM|
|000033d0| 6f 64 65 28 64 65 76 69 | 63 65 2c 26 6d 6f 64 65 |ode(devi|ce,&mode|
|000033e0| 29 3b 0d 09 09 09 69 66 | 28 65 72 72 6f 72 29 20 |);....if|(error) |
|000033f0| 45 72 72 6f 72 28 65 72 | 72 6f 72 29 3b 0d 09 09 |Error(er|ror);...|
|00003400| 09 65 6c 73 65 20 44 72 | 61 77 50 72 69 6e 74 66 |.else Dr|awPrintf|
|00003410| 28 22 30 78 25 58 5c 6e | 22 2c 6d 6f 64 65 29 3b |("0x%X\n|",mode);|
|00003420| 0d 09 09 0d 09 09 09 44 | 72 61 77 50 72 69 6e 74 |.......D|rawPrint|
|00003430| 66 28 22 53 65 74 44 65 | 66 61 75 6c 74 4d 6f 64 |f("SetDe|faultMod|
|00003440| 65 3a 20 22 29 3b 0d 09 | 09 09 65 72 72 6f 72 3d |e: ");..|..error=|
|00003450| 47 44 53 65 74 44 65 66 | 61 75 6c 74 4d 6f 64 65 |GDSetDef|aultMode|
|00003460| 28 64 65 76 69 63 65 2c | 6d 6f 64 65 29 3b 0d 09 |(device,|mode);..|
|00003470| 09 09 69 66 28 65 72 72 | 6f 72 29 20 45 72 72 6f |..if(err|or) Erro|
|00003480| 72 28 65 72 72 6f 72 29 | 3b 0d 09 09 09 65 6c 73 |r(error)|;....els|
|00003490| 65 20 44 72 61 77 50 72 | 69 6e 74 66 28 22 6f 6b |e DrawPr|intf("ok|
|000034a0| 5c 6e 22 29 3b 0d 09 09 | 7d 0d 09 09 69 66 28 70 |\n");...|}...if(p|
|000034b0| 61 74 63 68 20 26 26 20 | 45 71 75 61 6c 53 74 72 |atch && |EqualStr|
|000034c0| 69 6e 67 28 22 5c 70 2e | 44 69 73 70 6c 61 79 5f |ing("\p.|Display_|
|000034d0| 56 69 64 65 6f 5f 41 70 | 70 6c 65 5f 52 42 56 31 |Video_Ap|ple_RBV1|
|000034e0| 22 2c 47 44 4e 61 6d 65 | 28 64 65 76 69 63 65 29 |",GDName|(device)|
|000034f0| 2c 54 52 55 45 2c 46 41 | 4c 53 45 29 29 0d 09 09 |,TRUE,FA|LSE))...|
|00003500| 09 44 72 61 77 50 72 69 | 6e 74 66 28 0d 09 09 09 |.DrawPri|ntf(....|
|00003510| 22 54 68 69 73 20 4d 61 | 63 20 49 49 63 69 20 76 |"This Ma|c IIci v|
|00003520| 69 64 65 6f 20 64 72 69 | 76 65 72 20 68 61 73 20 |ideo dri|ver has |
|00003530| 62 65 65 6e 20 70 61 74 | 63 68 65 64 20 28 75 6e |been pat|ched (un|
|00003540| 74 69 6c 20 72 65 62 6f | 6f 74 29 20 74 6f 20 66 |til rebo|ot) to f|
|00003550| 69 78 20 61 20 62 75 67 | 5c 6e 22 0d 09 09 09 22 |ix a bug|\n"...."|
|00003560| 74 68 61 74 20 70 72 65 | 76 65 6e 74 73 20 72 65 |that pre|vents re|
|00003570| 61 64 69 6e 67 20 74 68 | 65 20 63 6c 75 74 2e 20 |ading th|e clut. |
|00003580| 54 68 65 20 76 65 72 73 | 69 6f 6e 20 6e 75 6d 62 |The vers|ion numb|
|00003590| 65 72 20 77 61 73 20 63 | 68 61 6e 67 65 64 20 66 |er was c|hanged f|
|000035a0| 72 6f 6d 20 30 20 74 6f | 20 25 64 2e 5c 6e 22 0d |rom 0 to| %d.\n".|
|000035b0| 09 09 09 2c 47 44 56 65 | 72 73 69 6f 6e 28 64 65 |...,GDVe|rsion(de|
|000035c0| 76 69 63 65 29 29 3b 0d | 09 7d 0d 09 53 65 6c 65 |vice));.|.}..Sele|
|000035d0| 63 74 57 69 6e 64 6f 77 | 28 77 69 6e 64 6f 77 5b |ctWindow|(window[|
|000035e0| 30 5d 29 3b 0d 09 53 65 | 74 50 6f 72 74 28 77 69 |0]);..Se|tPort(wi|
|000035f0| 6e 64 6f 77 5b 30 5d 29 | 3b 0d 09 44 72 61 77 50 |ndow[0])|;..DrawP|
|00003600| 72 69 6e 74 66 28 0d 09 | 09 22 54 68 69 73 20 63 |rintf(..|."This c|
|00003610| 6f 6d 70 6c 65 74 65 73 | 20 74 68 65 20 74 65 73 |ompletes| the tes|
|00003620| 74 20 6f 66 20 74 68 65 | 20 6b 6e 6f 77 6e 20 43 |t of the| known C|
|00003630| 6f 6e 74 72 6f 6c 20 61 | 6e 64 20 53 74 61 74 75 |ontrol a|nd Statu|
|00003640| 73 20 63 61 6c 6c 73 20 | 66 6f 72 20 65 61 63 68 |s calls |for each|
|00003650| 5c 6e 22 0d 09 09 22 6f | 66 20 79 6f 75 72 20 76 |\n"..."o|f your v|
|00003660| 69 64 65 6f 20 64 65 76 | 69 63 65 73 2e 20 46 6f |ideo dev|ices. Fo|
|00003670| 72 20 61 6e 20 65 78 70 | 6c 61 6e 61 74 69 6f 6e |r an exp|lanation|
|00003680| 20 6f 66 20 77 68 61 74 | 20 74 68 65 73 65 20 63 | of what| these c|
|00003690| 61 6c 6c 73 20 64 6f 2c | 20 73 65 65 5c 6e 22 0d |alls do,| see\n".|
|000036a0| 09 09 22 41 70 70 6c 65 | d5 73 20 62 6f 6f 6b 20 |.."Apple|.s book |
|000036b0| 22 29 3b 0d 09 54 65 78 | 74 46 61 63 65 28 69 74 |");..Tex|tFace(it|
|000036c0| 61 6c 69 63 29 3b 0d 09 | 44 72 61 77 50 72 69 6e |alic);..|DrawPrin|
|000036d0| 74 66 28 22 44 65 73 69 | 67 6e 69 6e 67 20 43 61 |tf("Desi|gning Ca|
|000036e0| 72 64 73 20 61 6e 64 20 | 44 72 69 76 65 72 73 2c |rds and |Drivers,|
|000036f0| 22 29 3b 0d 09 54 65 78 | 74 46 61 63 65 28 30 29 |");..Tex|tFace(0)|
|00003700| 3b 0d 09 44 72 61 77 50 | 72 69 6e 74 66 28 22 20 |;..DrawP|rintf(" |
|00003710| 33 72 64 20 45 64 2e 2c | 20 41 64 64 69 73 6f 6e |3rd Ed.,| Addison|
|00003720| 20 57 65 73 6c 65 79 2c | 20 43 68 61 70 74 65 72 | Wesley,| Chapter|
|00003730| 20 39 2e 5c 6e 22 29 3b | 0d 09 54 65 78 74 46 61 | 9.\n");|..TextFa|
|00003740| 63 65 28 62 6f 6c 64 29 | 3b 0d 09 44 72 61 77 50 |ce(bold)|;..DrawP|
|00003750| 72 69 6e 74 66 28 22 51 | 75 69 74 20 62 79 20 63 |rintf("Q|uit by c|
|00003760| 6c 6f 73 69 6e 67 20 61 | 6e 79 20 77 69 6e 64 6f |losing a|ny windo|
|00003770| 77 2c 20 6f 72 20 68 69 | 74 74 69 6e 67 20 43 6f |w, or hi|tting Co|
|00003780| 6d 6d 61 6e 64 2d 2e 5c | 6e 22 29 3b 0d 09 64 6f |mmand-.\|n");..do|
|00003790| 7b 0d 09 09 6b 65 65 70 | 57 61 69 74 69 6e 67 3d |{...keep|Waiting=|
|000037a0| 31 3b 0d 09 09 77 68 69 | 6c 65 28 21 47 65 74 4e |1;...whi|le(!GetN|
|000037b0| 65 78 74 45 76 65 6e 74 | 28 6d 44 6f 77 6e 4d 61 |extEvent|(mDownMa|
|000037c0| 73 6b 2b 6b 65 79 44 6f | 77 6e 4d 61 73 6b 2c 26 |sk+keyDo|wnMask,&|
|000037d0| 74 68 65 45 76 65 6e 74 | 29 29 3b 0d 09 09 73 77 |theEvent|));...sw|
|000037e0| 69 74 63 68 28 74 68 65 | 45 76 65 6e 74 2e 77 68 |itch(the|Event.wh|
|000037f0| 61 74 29 7b 0d 09 09 63 | 61 73 65 20 6d 6f 75 73 |at){...c|ase mous|
|00003800| 65 44 6f 77 6e 3a 0d 09 | 09 09 77 68 65 72 65 3d |eDown:..|..where=|
|00003810| 46 69 6e 64 57 69 6e 64 | 6f 77 28 74 68 65 45 76 |FindWind|ow(theEv|
|00003820| 65 6e 74 2e 77 68 65 72 | 65 2c 26 74 68 65 57 69 |ent.wher|e,&theWi|
|00003830| 6e 64 6f 77 29 3b 0d 09 | 09 09 73 77 69 74 63 68 |ndow);..|..switch|
|00003840| 28 77 68 65 72 65 29 7b | 0d 09 09 09 63 61 73 65 |(where){|....case|
|00003850| 20 69 6e 43 6f 6e 74 65 | 6e 74 3a 0d 09 09 09 63 | inConte|nt:....c|
|00003860| 61 73 65 20 69 6e 44 72 | 61 67 3a 0d 09 09 09 63 |ase inDr|ag:....c|
|00003870| 61 73 65 20 69 6e 47 72 | 6f 77 3a 0d 09 09 09 63 |ase inGr|ow:....c|
|00003880| 61 73 65 20 69 6e 47 6f | 41 77 61 79 3a 0d 09 09 |ase inGo|Away:...|
|00003890| 09 09 53 65 6c 65 63 74 | 57 69 6e 64 6f 77 28 74 |..Select|Window(t|
|000038a0| 68 65 57 69 6e 64 6f 77 | 29 3b 0d 09 09 09 7d 0d |heWindow|);....}.|
|000038b0| 09 09 09 69 66 28 77 68 | 65 72 65 3d 3d 69 6e 47 |...if(wh|ere==inG|
|000038c0| 6f 41 77 61 79 29 20 6b | 65 65 70 57 61 69 74 69 |oAway) k|eepWaiti|
|000038d0| 6e 67 20 3d 20 21 54 72 | 61 63 6b 47 6f 41 77 61 |ng = !Tr|ackGoAwa|
|000038e0| 79 28 74 68 65 57 69 6e | 64 6f 77 2c 74 68 65 45 |y(theWin|dow,theE|
|000038f0| 76 65 6e 74 2e 77 68 65 | 72 65 29 3b 0d 09 09 09 |vent.whe|re);....|
|00003900| 62 72 65 61 6b 3b 0d 09 | 09 63 61 73 65 20 6b 65 |break;..|.case ke|
|00003910| 79 44 6f 77 6e 3a 0d 09 | 09 09 69 66 28 74 68 65 |yDown:..|..if(the|
|00003920| 45 76 65 6e 74 2e 6d 6f | 64 69 66 69 65 72 73 20 |Event.mo|difiers |
|00003930| 26 20 63 6d 64 4b 65 79 | 29 20 73 77 69 74 63 68 |& cmdKey|) switch|
|00003940| 28 74 68 65 45 76 65 6e | 74 2e 6d 65 73 73 61 67 |(theEven|t.messag|
|00003950| 65 20 26 20 63 68 61 72 | 43 6f 64 65 4d 61 73 6b |e & char|CodeMask|
|00003960| 29 20 7b 0d 09 09 09 09 | 63 61 73 65 20 27 2e 27 |) {.....|case '.'|
|00003970| 3a 0d 09 09 09 09 63 61 | 73 65 20 27 77 27 3a 0d |:.....ca|se 'w':.|
|00003980| 09 09 09 09 6b 65 65 70 | 57 61 69 74 69 6e 67 3d |....keep|Waiting=|
|00003990| 30 3b 0d 09 09 09 7d 0d | 09 09 09 62 72 65 61 6b |0;....}.|...break|
|000039a0| 3b 0d 09 09 7d 0d 09 7d | 20 77 68 69 6c 65 20 28 |;...}..}| while (|
|000039b0| 6b 65 65 70 57 61 69 74 | 69 6e 67 29 3b 0d 09 53 |keepWait|ing);..S|
|000039c0| 65 74 50 6f 72 74 28 6f | 6c 64 50 6f 72 74 29 3b |etPort(o|ldPort);|
|000039d0| 0d 09 66 6f 72 28 69 3d | 30 3b 69 3c 73 63 72 65 |..for(i=|0;i<scre|
|000039e0| 65 6e 3b 69 2b 2b 29 44 | 69 73 70 6f 73 65 57 69 |en;i++)D|isposeWi|
|000039f0| 6e 64 6f 77 28 77 69 6e | 64 6f 77 5b 69 5d 29 3b |ndow(win|dow[i]);|
|00003a00| 0d 09 5f 65 78 69 74 28 | 30 29 3b 0d 7d 0d 0d 76 |.._exit(|0);.}..v|
|00003a10| 6f 69 64 20 45 72 72 6f | 72 28 69 6e 74 20 65 72 |oid Erro|r(int er|
|00003a20| 72 6f 72 29 0d 7b 0d 09 | 73 77 69 74 63 68 28 65 |ror).{..|switch(e|
|00003a30| 72 72 6f 72 29 7b 0d 09 | 63 61 73 65 20 2d 31 37 |rror){..|case -17|
|00003a40| 3a 0d 09 63 61 73 65 20 | 2d 31 38 3a 0d 09 09 44 |:..case |-18:...D|
|00003a50| 72 61 77 50 72 69 6e 74 | 66 28 22 6e 2f 61 5c 6e |rawPrint|f("n/a\n|
|00003a60| 22 29 3b 0d 09 09 62 72 | 65 61 6b 3b 0d 09 64 65 |");...br|eak;..de|
|00003a70| 66 61 75 6c 74 3a 0d 09 | 09 44 72 61 77 50 72 69 |fault:..|.DrawPri|
|00003a80| 6e 74 66 28 22 65 72 72 | 6f 72 20 25 64 5c 6e 22 |ntf("err|or %d\n"|
|00003a90| 2c 65 72 72 6f 72 29 3b | 0d 09 7d 0d 7d 00 00 00 |,error);|..}.}...|
|00003aa0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003ab0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003ac0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003ad0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003ae0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003af0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003b00| 00 00 01 00 00 00 01 a4 | 00 00 00 a4 00 00 00 52 |........|.......R|
|00003b10| 62 79 20 44 65 6e 69 73 | 20 47 2e 20 50 65 6c 6c |by Denis| G. Pell|
|00003b20| 69 0d 28 4f 72 69 67 69 | 6e 61 6c 6c 79 20 22 54 |i.(Origi|nally "T|
|00003b30| 0d 54 65 73 74 47 44 56 | 69 64 65 6f 2e 63 02 00 |.TestGDV|ideo.c..|
|00003b40| 00 00 54 45 58 54 4b 41 | 48 4c 00 00 00 00 00 00 |..TEXTKA|HL......|
|00003b50| 00 00 54 45 58 54 4b 41 | 48 4c 00 00 00 00 00 00 |..TEXTKA|HL......|
|00003b60| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003b70| 00 00 a7 e5 d5 86 00 00 | 00 00 00 00 01 f6 6e 20 |........|......n |
|00003b80| 47 44 56 69 64 65 6f 2e | 63 0d 54 68 65 20 63 61 |GDVideo.|c.The ca|
|00003b90| 6c 6c 73 20 61 72 65 20 | 64 6f 63 75 6d 65 6e 74 |lls are |document|
|00003ba0| 65 64 20 69 6e 20 44 65 | 73 69 67 6e 69 6e 67 20 |ed in De|signing |
|00003bb0| 43 61 72 64 73 20 61 6e | 64 20 44 72 69 76 65 72 |Cards an|d Driver|
|00003bc0| 73 2c 20 32 6e 64 20 45 | 64 69 74 69 6f 6e 2c 0d |s, 2nd E|dition,.|
|00003bd0| 43 68 61 70 74 65 72 20 | 39 2e 0d 0d 48 49 53 54 |Chapter |9...HIST|
|00003be0| 4f 52 59 3a 0d 38 2f 31 | 31 2f 38 39 09 64 67 70 |ORY:.8/1|1/89.dgp|
|00003bf0| 09 77 72 6f 74 65 20 69 | 74 0d 33 2f 32 33 2f 39 |.wrote i|t.3/23/9|
|00003c00| 00 00 00 48 00 09 4d 6f | 6e 61 63 6f 00 67 65 73 |...H..Mo|naco.ges|
|00003c10| 20 74 6f 20 48 41 52 44 | 20 44 49 53 4b 3a c9 3a | to HARD| DISK:.:|
|00003c20| 56 69 64 65 6f 54 00 06 | 00 04 00 50 00 20 01 dd |VideoT..|...P. ..|
|00003c30| 02 3d 00 50 00 20 01 dd | 02 3d a3 49 42 9e 00 00 |.=.P. ..|.=.IB...|
|00003c40| 04 ee 00 00 04 ee 00 00 | 02 07 01 00 00 00 00 0a |........|........|
|00003c50| 00 00 31 55 01 72 00 00 | 00 00 00 00 00 46 00 00 |..1U.r..|.....F..|
|00003c60| 35 7a 01 91 00 00 00 00 | 00 00 32 be 01 7b 00 00 |5z......|..2..{..|
|00003c70| 00 00 00 00 30 ee 01 6f | 00 00 00 00 00 00 2f bb |....0..o|....../.|
|00003c80| 01 67 00 00 00 00 00 00 | 2c 7f 01 49 00 00 00 00 |.g......|,..I....|
|00003c90| 00 00 28 6b 01 23 00 00 | 00 00 00 00 24 27 01 03 |..(k.#..|....$'..|
|00003ca0| 00 00 00 00 00 00 01 00 | 00 00 01 a4 00 00 00 a4 |........|........|
|00003cb0| 00 00 00 52 00 5e 09 54 | 13 d6 00 00 00 1c 00 52 |...R.^.T|.......R|
|00003cc0| 00 01 4d 50 53 52 00 00 | 00 12 42 4b 50 54 00 01 |..MPSR..|..BKPT..|
|00003cd0| 00 1e 03 ed ff ff 00 00 | 00 00 00 00 00 00 1e ce |........|........|
|00003ce0| ff ff 00 00 00 4c 00 00 | 00 00 13 c9 ff ff 00 00 |.....L..|........|
|00003cf0| 00 5a 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |.Z......|........|
+--------+-------------------------+-------------------------+--------+--------+